flwr_oauth2/revocation
Types
Defines a RFC7009 Revocation Request.
pub type RevocationRequest {
RevocationRequest(
oauth_server: uri.Uri,
token: String,
token_type_hint: option.Option(TokenTypeHint),
credentials: flwr_oauth2.ClientAuthentication,
)
}
Constructors
-
RevocationRequest( oauth_server: uri.Uri, token: String, token_type_hint: option.Option(TokenTypeHint), credentials: flwr_oauth2.ClientAuthentication, )
Defines the type hint of a revocation request.
pub type TokenTypeHint {
AccessToken
RefreshToken
Other(hint: String)
}
Constructors
-
AccessTokenThis defines that the revocation request is for an access token. The revocation of access tokens might not be supported by the OAuth 2.0 server
-
RefreshTokenThis defines that the revocation request is for a refresh token. The revocation of refresh tokens must be supported by the OAuth 2.0 server if it implements RFC 7009.
-
Other(hint: String)An OAuth 2.0 server may define its own token type hints, use this constructor if this is the case.
Values
pub fn to_http_request(
revocation_request revocation_request: RevocationRequest,
) -> Result(request.Request(String), flwr_oauth2.Error)