pub struct Social { /* private fields */ }Expand description
Social Data representing the social module.
Implementations§
Source§impl Social
impl Social
Sourcepub fn new(oauth_client: Auth0Client) -> Self
pub fn new(oauth_client: Auth0Client) -> Self
Create a new Social object.
§Parameters
oauth_client- The Auth0Client to use to interact with Auth0 APIs.
Authenticate a user with a social provider.
§Parameters
client_id- The client ID of your Auth0 application.response_type- The type of response you want from Auth0. This should be “code”.redirect_uri- The URL to which Auth0 will redirect the browser after authorization has been granted by the user.scope- The scopes which you want to request authorization for. These must be separated by a space.state- An opaque value used to prevent CSRF attacks.
Sourcepub async fn get_access_token(
&self,
client_id: &str,
client_secret: &str,
audience: &str,
grant_type: &str,
) -> Result<String, Box<dyn Error>>
pub async fn get_access_token( &self, client_id: &str, client_secret: &str, audience: &str, grant_type: &str, ) -> Result<String, Box<dyn Error>>
Get an access token from Auth0.
§Parameters
client_id- The client ID of your Auth0 application.client_secret- The client secret of your Auth0 application.audience- The audience of your Auth0 application.grant_type- The grant type for the token request. This should be “client_credentials”.
Auto Trait Implementations§
impl !RefUnwindSafe for Social
impl !UnwindSafe for Social
impl Freeze for Social
impl Send for Social
impl Sync for Social
impl Unpin for Social
impl UnsafeUnpin for Social
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