pub struct OAuth { /* private fields */ }Implementations§
Source§impl OAuth
impl OAuth
Sourcepub fn new(
base_url: &str,
http: Outgoing,
providers: Vec<Provider>,
) -> Result<Self>
pub fn new( base_url: &str, http: Outgoing, providers: Vec<Provider>, ) -> Result<Self>
http must allow every host of the providers’ token, user and key endpoints, and of
each OIDC issuer whose keys are discovered; keys it discovers on another host are
fetched from a public HTTPS address only.
Sourcepub fn from_environment() -> Result<Option<Self>>
pub fn from_environment() -> Result<Option<Self>>
SOFIE_OAUTH_PROVIDERS names them (google, microsoft, github, or another
OIDC provider); none set, none offered. Each reads
SOFIE_OAUTH_<NAME>_CLIENT_ID and _CLIENT_SECRET, Microsoft _TENANT, and another
provider _LABEL, _ISSUER, _AUTHORIZATION_URL and _TOKEN_URL;
SOFIE_OAUTH_BASE_URL, else SOFIE_BASE_URL, is the app’s public URL.
Auto Trait Implementations§
impl !RefUnwindSafe for OAuth
impl !UnwindSafe for OAuth
impl Forget for OAuth
impl Freeze for OAuth
impl Send for OAuth
impl Sync for OAuth
impl Unpin for OAuth
impl UnsafeUnpin for OAuth
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