You've already forked authentication-service
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:
committed by
Quentin Gliech
parent
66055b044e
commit
db25574a96
@ -126,7 +126,9 @@ pub enum ApplicationType {
|
|||||||
|
|
||||||
/// Subject Identifier types.
|
/// 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(
|
#[derive(
|
||||||
SerializeDisplay, DeserializeFromStr, Clone, Copy, PartialEq, Eq, Hash, Debug, Display, FromStr,
|
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.
|
/// This provides the same `sub` (subject) value to all Clients.
|
||||||
Public,
|
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,
|
Pairwise,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,10 +152,12 @@ pub enum ClaimType {
|
|||||||
/// Claims that are directly asserted by the OpenID Provider.
|
/// Claims that are directly asserted by the OpenID Provider.
|
||||||
Normal,
|
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,
|
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,
|
Distributed,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +169,8 @@ pub static DEFAULT_RESPONSE_MODES_SUPPORTED: &[ResponseMode] =
|
|||||||
pub static DEFAULT_GRANT_TYPES_SUPPORTED: &[GrantType] =
|
pub static DEFAULT_GRANT_TYPES_SUPPORTED: &[GrantType] =
|
||||||
&[GrantType::AuthorizationCode, GrantType::Implicit];
|
&[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] =
|
pub static DEFAULT_AUTH_METHODS_SUPPORTED: &[OAuthClientAuthenticationMethod] =
|
||||||
&[OAuthClientAuthenticationMethod::ClientSecretBasic];
|
&[OAuthClientAuthenticationMethod::ClientSecretBasic];
|
||||||
|
|
||||||
|
@ -352,7 +352,8 @@ pub struct DeviceAuthorizationRequest {
|
|||||||
pub scope: Option<Scope>,
|
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;
|
pub const DEFAULT_DEVICE_AUTHORIZATION_INTERVAL_SECONDS: i64 = 5;
|
||||||
|
|
||||||
/// A successful response from the [Device Authorization Endpoint].
|
/// A successful response from the [Device Authorization Endpoint].
|
||||||
|
@ -69,7 +69,9 @@ pub const PHONE: ScopeToken = ScopeToken::from_static("phone");
|
|||||||
|
|
||||||
/// `offline_access`.
|
/// `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");
|
pub const OFFLINE_ACCESS: ScopeToken = ScopeToken::from_static("offline_access");
|
||||||
|
|
||||||
// As per RFC6749 appendix A:
|
// As per RFC6749 appendix A:
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
use std::{fmt, str::FromStr};
|
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;
|
use crate::PrivString;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user