pub struct OpenIdconnectClient {
pub client_id: ClientId,
pub issuer_url: IssuerUrl,
pub issuer_jwks: Option<JwkSet>,
pub provider_metadata: CoreProviderMetadata,
pub private_key: EncodingKey,
pub config: OnesOidcConfig,
}Expand description
Main OIDC client for authentication operations
Fields§
§client_id: ClientId§issuer_url: IssuerUrl§issuer_jwks: Option<JwkSet>§provider_metadata: CoreProviderMetadata§private_key: EncodingKey§config: OnesOidcConfigImplementations§
Source§impl OpenIdconnectClient
impl OpenIdconnectClient
pub fn new( client_id: ClientId, issuer_url: IssuerUrl, provider_metadata: CoreProviderMetadata, private_key: EncodingKey, ) -> Self
pub fn with_config( client_id: ClientId, issuer_url: IssuerUrl, provider_metadata: CoreProviderMetadata, private_key: EncodingKey, config: OnesOidcConfig, ) -> Self
pub fn client_id(&self) -> &ClientId
pub fn issuer_url(&self) -> &IssuerUrl
pub fn provider_metadata(&self) -> &CoreProviderMetadata
pub fn private_key(&self) -> &EncodingKey
pub fn device_jwt(&self) -> Result<String, DeviceError>
pub async fn make_ciba_request( &self, login_hint: &LoginHint, scope: &str, binding_message: &str, resource: Option<String>, qr_session_id: Option<String>, ) -> Result<CibaResponse, OidcError>
pub async fn check_ciba_status( &self, auth_request_id: &str, ) -> Result<CibaStatusResponse, OidcError>
pub async fn make_qr_auth_session_idp( &self, ) -> Result<QrAuthSessionIdp, OidcError>
pub async fn verify_qr_auth_session_idp( &self, session: QrStatusRequest, scope: &str, binding_message: &str, resource: Option<String>, ) -> Result<Option<QrAuthSessionIdp>, OidcError>
pub async fn token_introspection( &self, access_token: &AccessToken, ) -> Result<ClientCredentialsIntrospection, OidcError>
pub async fn get_jwks(&mut self) -> Result<JwkSet, Error>
pub async fn request_device_access_token( &self, ) -> Result<StandardTokenResponse<EmptyExtraTokenFields, CoreTokenType>, DeviceError>
pub async fn device_access_token( &self, ) -> Result<StandardTokenResponse<EmptyExtraTokenFields, CoreTokenType>, DeviceError>
pub fn make_device_jwt(&self) -> Result<String, DeviceError>
pub async fn validate_jwt(&mut self, jwt: &str) -> Result<JwtPayload, OidcError>
pub async fn validate_token( &mut self, token: &String, permitted_idp_scopes: Option<Vec<String>>, ) -> Result<AuthenticationResult, OidcError>
Trait Implementations§
Source§impl Clone for OpenIdconnectClient
impl Clone for OpenIdconnectClient
Source§fn clone(&self) -> OpenIdconnectClient
fn clone(&self) -> OpenIdconnectClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OpenIdconnectClient
impl RefUnwindSafe for OpenIdconnectClient
impl Send for OpenIdconnectClient
impl Sync for OpenIdconnectClient
impl Unpin for OpenIdconnectClient
impl UnwindSafe for OpenIdconnectClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more