diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-11 17:11:39 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-11 17:11:39 -0600 |
| commit | 5ffc9b007ccbd8a4510b58de72aaee53291d7973 (patch) | |
| tree | f696a2a7599926d402c5456c434bd87e5e325c3a /src/oauth/types.rs | |
| parent | dbd3c780f27bd5bee23adf6e280b84d669230e0d (diff) | |
refactor: apply SOLID principles
Diffstat (limited to 'src/oauth/types.rs')
| -rw-r--r-- | src/oauth/types.rs | 17 |
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, |
