1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-07 22:41:18 +03:00

Make sure Scope and InvalidScope are reexported from mas-oidc-client

This commit is contained in:
Kévin Commaille
2022-11-30 12:42:43 +01:00
committed by Quentin Gliech
parent 66055b044e
commit db25574a96
4 changed files with 19 additions and 8 deletions

View File

@ -126,7 +126,9 @@ pub enum ApplicationType {
/// Subject Identifier types.
///
/// A Subject Identifier is a locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client.
/// A Subject Identifier is a locally unique and never reassigned identifier
/// within the Issuer for the End-User, which is intended to be consumed by the
/// Client.
#[derive(
SerializeDisplay, DeserializeFromStr, Clone, Copy, PartialEq, Eq, Hash, Debug, Display, FromStr,
)]
@ -135,7 +137,9 @@ pub enum SubjectType {
/// This provides the same `sub` (subject) value to all Clients.
Public,
/// This provides a different `sub` value to each Client, so as not to enable Clients to correlate the End-User's activities without permission.
/// This provides a different `sub` value to each Client, so as not to
/// enable Clients to correlate the End-User's activities without
/// permission.
Pairwise,
}
@ -148,10 +152,12 @@ pub enum ClaimType {
/// Claims that are directly asserted by the OpenID Provider.
Normal,
/// Claims that are asserted by a Claims Provider other than the OpenID Provider but are returned by OpenID Provider.
/// Claims that are asserted by a Claims Provider other than the OpenID
/// Provider but are returned by OpenID Provider.
Aggregated,
/// Claims that are asserted by a Claims Provider other than the OpenID Provider but are returned as references by the OpenID Provider.
/// Claims that are asserted by a Claims Provider other than the OpenID
/// Provider but are returned as references by the OpenID Provider.
Distributed,
}
@ -163,7 +169,8 @@ pub static DEFAULT_RESPONSE_MODES_SUPPORTED: &[ResponseMode] =
pub static DEFAULT_GRANT_TYPES_SUPPORTED: &[GrantType] =
&[GrantType::AuthorizationCode, GrantType::Implicit];
/// The default value of `token_endpoint_auth_methods_supported` if it is not set.
/// The default value of `token_endpoint_auth_methods_supported` if it is not
/// set.
pub static DEFAULT_AUTH_METHODS_SUPPORTED: &[OAuthClientAuthenticationMethod] =
&[OAuthClientAuthenticationMethod::ClientSecretBasic];

View File

@ -352,7 +352,8 @@ pub struct DeviceAuthorizationRequest {
pub scope: Option<Scope>,
}
/// The default value of the `interval` between polling requests, if it is not set.
/// The default value of the `interval` between polling requests, if it is not
/// set.
pub const DEFAULT_DEVICE_AUTHORIZATION_INTERVAL_SECONDS: i64 = 5;
/// A successful response from the [Device Authorization Endpoint].

View File

@ -69,7 +69,9 @@ pub const PHONE: ScopeToken = ScopeToken::from_static("phone");
/// `offline_access`.
///
/// Requests that an OAuth 2.0 Refresh Token be issued that can be used to obtain an Access Token that grants access to the End-User's Userinfo Endpoint even when the End-User is not present (not logged in).
/// Requests that an OAuth 2.0 Refresh Token be issued that can be used to
/// obtain an Access Token that grants access to the End-User's Userinfo
/// Endpoint even when the End-User is not present (not logged in).
pub const OFFLINE_ACCESS: ScopeToken = ScopeToken::from_static("offline_access");
// As per RFC6749 appendix A:

View File

@ -16,7 +16,8 @@
use std::{fmt, str::FromStr};
use oauth2_types::scope::{InvalidScope, Scope, ScopeToken as StrScopeToken};
use oauth2_types::scope::ScopeToken as StrScopeToken;
pub use oauth2_types::scope::{InvalidScope, Scope};
use crate::PrivString;