pub struct OAuthProvider { /* private fields */ }Expand description
OAuth2 Provider with runtime state
Implementations§
Source§impl OAuthProvider
impl OAuthProvider
Sourcepub fn new(config: ProviderConfig) -> Self
pub fn new(config: ProviderConfig) -> Self
Create a new provider
Sourcepub fn config(&self) -> &ProviderConfig
pub fn config(&self) -> &ProviderConfig
Get the configuration
Get authorization endpoint
Sourcepub fn token_endpoint(&self) -> Result<&str>
pub fn token_endpoint(&self) -> Result<&str>
Get token endpoint
Get device authorization endpoint
Sourcepub fn is_domain_allowed(&self, email: &str) -> bool
pub fn is_domain_allowed(&self, email: &str) -> bool
Check if email domain is allowed
Sourcepub fn is_in_required_group(&self, groups: &[String]) -> bool
pub fn is_in_required_group(&self, groups: &[String]) -> bool
Check if user is in required groups
Auto Trait Implementations§
impl Freeze for OAuthProvider
impl !RefUnwindSafe for OAuthProvider
impl Send for OAuthProvider
impl Sync for OAuthProvider
impl Unpin for OAuthProvider
impl !UnwindSafe for OAuthProvider
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