Trait Provider

Source
pub trait Provider:
    Send
    + Sync
    + Sized {
    // Required methods
    fn authorization_endpoint(&self) -> Url;
    fn token_endpoint(&self) -> Url;
    fn validate_iss(&self, iss: &str) -> bool;

    // Provided method
    fn client(self) -> ClientBuilder<Self> { ... }
}
Expand description

OpenID Connect ID provider

Required Methods§

Source

fn authorization_endpoint(&self) -> Url

Authorization endpoint of IdP

See OpenID Connect Core spec. 3.1.2

Source

fn token_endpoint(&self) -> Url

Token endpoint of IdP

See OpenID Connect Core spec. 3.1.3

Source

fn validate_iss(&self, iss: &str) -> bool

validate iss issure claim in ID token.

If iss claim is valid, return true.

Provided Methods§

Source

fn client(self) -> ClientBuilder<Self>

Create tiny_oidc_rp::Client

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§