pub struct Issuer { /* private fields */ }
Expand description
Holds all the discovered values from the OIDC Issuer
Implementations§
Source§impl Issuer
Issuer Instance Creation
impl Issuer
Issuer Instance Creation
Sourcepub fn new(metadata: IssuerMetadata) -> Self
pub fn new(metadata: IssuerMetadata) -> Self
§Issuer
Create an Issuer instance using IssuerMetadata.
metadata
- IssuerMetadata
No OIDC Discovery defaults are set if Issuer is created using this method.
If no introspection/revocation endpoint auth methods or algorithms are specified, value of token endpoint auth methods and algorithms are used as the the value for the said properties.
Source§impl Issuer
OIDC Issuer Discovery
impl Issuer
OIDC Issuer Discovery
Sourcepub async fn discover_async<T>(
http_client: &T,
issuer: &str,
) -> OidcReturnType<Issuer>where
T: OidcHttpClient,
pub async fn discover_async<T>(
http_client: &T,
issuer: &str,
) -> OidcReturnType<Issuer>where
T: OidcHttpClient,
§Discover OIDC Issuer
Discover an OIDC Issuer using the issuer url.
http_client
- The http client used to make the request.issuer
- The issuer url (absolute).
Only an absolute urls are accepted, passing in auth.example.com
will result in an error.
Source§impl Issuer
impl Issuer
Sourcepub async fn webfinger_async<T>(
http_client: &T,
input: &str,
) -> OidcReturnType<Issuer>where
T: OidcHttpClient,
pub async fn webfinger_async<T>(
http_client: &T,
input: &str,
) -> OidcReturnType<Issuer>where
T: OidcHttpClient,
§Webfinger OIDC Issuer Discovery
Discover an OIDC Issuer using the user email, url, url with port syntax or acct syntax.
http_client
- The http client to make the requestinput
- The resource.
Source§impl Issuer
New Client implementation for Issuer
impl Issuer
New Client implementation for Issuer
Sourcepub fn client(
&self,
metadata: ClientMetadata,
jwks: Option<Jwks>,
client_options: Option<ClientOptions>,
fapi: Option<Fapi>,
) -> OidcReturnType<Client>
pub fn client( &self, metadata: ClientMetadata, jwks: Option<Jwks>, client_options: Option<ClientOptions>, fapi: Option<Fapi>, ) -> OidcReturnType<Client>
§Creates a client from the issuer
This method creates a new Client from the issuer.
A client metadata with a required client_id
field is also required
metadata
- ClientMetadatajwks
- The client jwks with private keys.client_options
- Client options.fapi
- Version of FAPI
Note: If the Issuer already have a request interceptor and none was passed in through interceptor
,
the interceptor from the Issuer is used.
Source§impl Issuer
impl Issuer
Sourcepub fn get_metadata(&self) -> IssuerMetadata
pub fn get_metadata(&self) -> IssuerMetadata
Gets the IssuerMetadata of the Issuer
Source§impl Issuer
Issuer’s Keystore methods
impl Issuer
Issuer’s Keystore methods
Sourcepub async fn reload_jwks_async<T>(
&mut self,
http_client: &T,
) -> OidcReturnType<bool>where
T: OidcHttpClient,
pub async fn reload_jwks_async<T>(
&mut self,
http_client: &T,
) -> OidcReturnType<bool>where
T: OidcHttpClient,
Reload Issuer Jwks
This method force refreshes the issuer Jwks using the configured Jwks Uri.
If no jwks_uri
is found, returns an OidcClientError.