This repository was archived by the owner on Dec 24, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
AspNet.Security.OAuth.Introspection
Owin.Security.OAuth.Introspection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public static class Claims {
1414 public const string NotBefore = "nbf" ;
1515 public const string Scope = "scope" ;
1616 public const string Subject = "sub" ;
17+ public const string TokenId = "jti" ;
1718 public const string TokenType = "token_type" ;
1819 public const string Username = "username" ;
1920 }
@@ -30,6 +31,7 @@ public static class Parameters {
3031 public static class Properties {
3132 public const string Audiences = ".audiences" ;
3233 public const string Scopes = ".scopes" ;
34+ public const string TicketId = ".ticket_id" ;
3335 public const string Token = "access_token" ;
3436 }
3537
Original file line number Diff line number Diff line change @@ -286,6 +286,13 @@ protected virtual async Task<AuthenticationTicket> CreateTicketAsync(string toke
286286 continue ;
287287 }
288288
289+ // Add the token identifier as a property on the authentication ticket.
290+ case OAuthIntrospectionConstants . Claims . TokenId : {
291+ properties . Items [ OAuthIntrospectionConstants . Properties . TicketId ] = property . Value < string > ( ) ;
292+
293+ continue ;
294+ }
295+
289296 // Extract the scope values from the space-delimited
290297 // "scope" claim and store them as individual claims.
291298 // See https://tools.ietf.org/html/rfc7662#section-2.2
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public static class Claims {
1414 public const string NotBefore = "nbf" ;
1515 public const string Scope = "scope" ;
1616 public const string Subject = "sub" ;
17+ public const string TokenId = "jti" ;
1718 public const string TokenType = "token_type" ;
1819 public const string Username = "username" ;
1920 }
@@ -34,6 +35,7 @@ public static class Parameters {
3435 public static class Properties {
3536 public const string Audiences = ".audiences" ;
3637 public const string Scopes = ".scopes" ;
38+ public const string TicketId = ".ticket_id" ;
3739 public const string Token = "access_token" ;
3840 }
3941
Original file line number Diff line number Diff line change @@ -275,6 +275,13 @@ protected virtual async Task<AuthenticationTicket> CreateTicketAsync(string toke
275275
276276 continue ;
277277 }
278+
279+ // Add the token identifier as a property on the authentication ticket.
280+ case OAuthIntrospectionConstants . Claims . TokenId : {
281+ properties . Dictionary [ OAuthIntrospectionConstants . Properties . TicketId ] = property . Value < string > ( ) ;
282+
283+ continue ;
284+ }
278285
279286 // Extract the scope values from the space-delimited
280287 // "scope" claim and store them as individual claims.
You can’t perform that action at this time.
0 commit comments