pub trait RevocableToken {
    // Required methods
    fn secret(&self) -> &str;
    fn type_hint(&self) -> Option<&str>;
}
Expand description

A revocable token.

Implement this trait to indicate support for token revocation per RFC 7009 OAuth 2.0 Token Revocation.

Required Methods§

source

fn secret(&self) -> &str

The actual token value to be revoked.

source

fn type_hint(&self) -> Option<&str>

Indicates the type of the token being revoked, as defined by RFC 7009, Section 2.1.

Implementations should return Some(...) values for token types that the target authorization servers are expected to know (e.g. because they are registered in the OAuth Token Type Hints Registry) so that they can potentially optimize their search for the token to be revoked.

Implementors§