Available on crate feature
api only.Expand description
The AuthScheme trait used to specify the authentication scheme used by endpoints and the types
that implement it.
Structs§
- Access
Token - Authentication is performed by including an access token in the
Authenticationhttp header, or anaccess_tokenquery parameter. - Access
Token Optional - Authentication is optional, and it is performed by including an access token in the
Authenticationhttp header, or anaccess_tokenquery parameter. - Appservice
Token - Authentication is required, and can only be performed for appservices, by including an
appservice access token in the
Authenticationhttp header, oraccess_tokenquery parameter. - Appservice
Token Optional - No authentication is performed for clients, but it can be performed for appservices, by
including an appservice access token in the
Authenticationhttp header, or anaccess_tokenquery parameter. - NoAccess
Token - No authentication is performed on an API that usually relies on access tokens.
- NoAuthentication
- No authentication is performed.
Enums§
- AddRequired
Token Error - An error that can occur when adding an
AuthSchemethat requires an access token. - Extract
Token Error - An error that can occur when extracting an
AuthSchemethat expects an access token. - Send
Access Token - An enum to control whether an access token should be added to outgoing requests
Traits§
- Auth
Scheme - Trait implemented by types representing an authentication scheme used by an endpoint.
- Client
Scoped Auth Scheme - A marker trait indicating that endpoints which use this auth scheme
require clients authenticated using the OAuth 2.0 API to request
certain scopes. See
Metadata::required_client_scopes()for more information.
Functions§
- add_
access_ token_ as_ authorization_ header - Add the given access token as an
AuthorizationHTTP header to the given map. - extract_
bearer_ or_ query_ token - Extract the access token from the
AuthorizationHTTP header or the query string of the given request.