summaryrefslogtreecommitdiff
path: root/src/oauth/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/oauth/types.rs')
-rw-r--r--src/oauth/types.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/oauth/types.rs b/src/oauth/types.rs
index 4f2c363..3d1c581 100644
--- a/src/oauth/types.rs
+++ b/src/oauth/types.rs
@@ -76,6 +76,23 @@ pub struct TokenIntrospectionResponse {
pub jti: Option<String>,
}
+impl TokenIntrospectionResponse {
+ pub fn inactive() -> Self {
+ Self {
+ active: false,
+ client_id: None,
+ username: None,
+ scope: None,
+ exp: None,
+ iat: None,
+ sub: None,
+ aud: None,
+ iss: None,
+ jti: None,
+ }
+ }
+}
+
#[derive(Debug, Serialize, Deserialize)]
pub struct TokenRevocationRequest {
pub token: String,