Struct openid_client::Client
source · pub struct Client { /* private fields */ }Expand description
Implementations§
source§impl Client
impl Client
sourcepub fn from_uri(
registration_client_uri: &str,
registration_access_token: Option<String>,
jwks: Option<Jwks>,
client_options: Option<ClientOptions>,
issuer: Option<&Issuer>
) -> Result<Self, OidcClientError>
pub fn from_uri( registration_client_uri: &str, registration_access_token: Option<String>, jwks: Option<Jwks>, client_options: Option<ClientOptions>, issuer: Option<&Issuer> ) -> Result<Self, OidcClientError>
Creates a client from the Client Read Endpoint
This is a blocking method. Checkout Client::from_uri_async() for async version.
Creates a Client from the Client read endpoint.
The Jwks is completely ignored if the jwks_uri is present from the response.
fn main() {
let client =
Client::from_uri("https://auth.example.com/client/id", None, None, None, None);
}TODO: Document snippets using rest of the arguments
sourcepub fn from_uri_with_interceptor(
registration_client_uri: &str,
interceptor: RequestInterceptor,
registration_access_token: Option<String>,
jwks: Option<Jwks>,
client_options: Option<ClientOptions>,
issuer: Option<&Issuer>
) -> Result<Self, OidcClientError>
pub fn from_uri_with_interceptor( registration_client_uri: &str, interceptor: RequestInterceptor, registration_access_token: Option<String>, jwks: Option<Jwks>, client_options: Option<ClientOptions>, issuer: Option<&Issuer> ) -> Result<Self, OidcClientError>
Creates a client with request interceptor from the Client Read Endpoint
This is a blocking method. Checkout Client::from_uri_with_interceptor_async() for async version.
fn main() {
let client =
Client::from_uri_with_interceptor("https://auth.example.com/client/id", None, None, None, None);
}TODO: Document snippets using rest of the arguments
sourcepub async fn from_uri_async(
registration_client_uri: &str,
registration_access_token: Option<String>,
jwks: Option<Jwks>,
client_options: Option<ClientOptions>,
issuer: Option<&Issuer>
) -> Result<Self, OidcClientError>
pub async fn from_uri_async( registration_client_uri: &str, registration_access_token: Option<String>, jwks: Option<Jwks>, client_options: Option<ClientOptions>, issuer: Option<&Issuer> ) -> Result<Self, OidcClientError>
Creates a client from the Client Read Endpoint
This is an async method. Checkout Client::from_uri() for the blocking version.
Creates a Client from the Client read endpoint.
The Jwks is completely ignored if the jwks_uri is present from the response.
fn main() {
let client =
Client::from_uri_async("https://auth.example.com/client/id", None, None, None, None);
}TODO: Document snippets using rest of the arguments
sourcepub async fn from_uri_with_interceptor_async(
registration_client_uri: &str,
interceptor: RequestInterceptor,
registration_access_token: Option<String>,
jwks: Option<Jwks>,
client_options: Option<ClientOptions>,
issuer: Option<&Issuer>
) -> Result<Self, OidcClientError>
pub async fn from_uri_with_interceptor_async( registration_client_uri: &str, interceptor: RequestInterceptor, registration_access_token: Option<String>, jwks: Option<Jwks>, client_options: Option<ClientOptions>, issuer: Option<&Issuer> ) -> Result<Self, OidcClientError>
Creates a client with request interceptor from the Client Read Endpoint
This is an async method. Checkout Client::from_uri_with_interceptor() for the blocking version.
fn main() {
let client =
Client::from_uri_with_interceptor_async("https://auth.example.com/client/id", None, None, None, None);
}TODO: Document snippets using rest of the arguments
source§impl Client
impl Client
Getter & Setter method implementations for Client
sourcepub fn get_client_id(&self) -> String
pub fn get_client_id(&self) -> String
Get client id
sourcepub fn get_client_secret(&self) -> Option<String>
pub fn get_client_secret(&self) -> Option<String>
Get client secret
sourcepub fn get_grant_types(&self) -> Vec<String>
pub fn get_grant_types(&self) -> Vec<String>
Get grant types
sourcepub fn get_id_token_signed_response_alg(&self) -> String
pub fn get_id_token_signed_response_alg(&self) -> String
Get id token signed response algorithm
sourcepub fn get_response_types(&self) -> Vec<String>
pub fn get_response_types(&self) -> Vec<String>
Get response types. See ClientMetadata.
sourcepub fn get_token_endpoint_auth_method(&self) -> String
pub fn get_token_endpoint_auth_method(&self) -> String
Get token endpoint authentication method. See ClientMetadata.
sourcepub fn get_token_endpoint_auth_signing_alg(&self) -> Option<String>
pub fn get_token_endpoint_auth_signing_alg(&self) -> Option<String>
Get token endpoint authentication signing alg. See ClientMetadata.
sourcepub fn get_introspection_endpoint_auth_method(&self) -> Option<String>
pub fn get_introspection_endpoint_auth_method(&self) -> Option<String>
Get introspection endpoint authentication method. See ClientMetadata.
sourcepub fn get_introspection_endpoint_auth_signing_alg(&self) -> Option<String>
pub fn get_introspection_endpoint_auth_signing_alg(&self) -> Option<String>
Get introspection endpoint authentication signing alg. See ClientMetadata.
sourcepub fn get_revocation_endpoint_auth_method(&self) -> Option<String>
pub fn get_revocation_endpoint_auth_method(&self) -> Option<String>
Get revocation endpoint authentication method. See ClientMetadata.
sourcepub fn get_revocation_endpoint_auth_signing_alg(&self) -> Option<String>
pub fn get_revocation_endpoint_auth_signing_alg(&self) -> Option<String>
Get revocation endpoint authentication signing alg. See ClientMetadata.
sourcepub fn get_redirect_uri(&self) -> Option<String>
pub fn get_redirect_uri(&self) -> Option<String>
Get redirect uri. See ClientMetadata.
sourcepub fn get_redirect_uris(&self) -> Option<Vec<String>>
pub fn get_redirect_uris(&self) -> Option<Vec<String>>
Get redirect uris. See ClientMetadata.
sourcepub fn get_response_type(&self) -> Option<String>
pub fn get_response_type(&self) -> Option<String>
Get response type
sourcepub fn get_issuer(&self) -> Option<&Issuer>
pub fn get_issuer(&self) -> Option<&Issuer>
Gets the issuer that the client was created with.