You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Support for token revocation
This commit is contained in:
@ -91,7 +91,7 @@ impl SimpleRoute for OidcUserinfo {
|
||||
const PATH: &'static str = "/oauth2/userinfo";
|
||||
}
|
||||
|
||||
/// `POST /oauth2/userinfo`
|
||||
/// `POST /oauth2/introspect`
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct OAuth2Introspection;
|
||||
|
||||
@ -99,6 +99,14 @@ impl SimpleRoute for OAuth2Introspection {
|
||||
const PATH: &'static str = "/oauth2/introspect";
|
||||
}
|
||||
|
||||
/// `POST /oauth2/revoke`
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct OAuth2Revocation;
|
||||
|
||||
impl SimpleRoute for OAuth2Revocation {
|
||||
const PATH: &'static str = "/oauth2/revoke";
|
||||
}
|
||||
|
||||
/// `POST /oauth2/token`
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct OAuth2TokenEndpoint;
|
||||
|
@ -75,6 +75,12 @@ impl UrlBuilder {
|
||||
self.url_for(&crate::endpoints::OAuth2Introspection)
|
||||
}
|
||||
|
||||
/// OAuth 2.0 revocation endpoint
|
||||
#[must_use]
|
||||
pub fn oauth_revocation_endpoint(&self) -> Url {
|
||||
self.url_for(&crate::endpoints::OAuth2Revocation)
|
||||
}
|
||||
|
||||
/// OAuth 2.0 client registration endpoint
|
||||
#[must_use]
|
||||
pub fn oauth_registration_endpoint(&self) -> Url {
|
||||
|
Reference in New Issue
Block a user