This repository was archived by the owner on Dec 24, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
AspNet.Security.OAuth.Introspection
Owin.Security.OAuth.Introspection Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public static class Claims {
14
14
public const string NotBefore = "nbf" ;
15
15
public const string Scope = "scope" ;
16
16
public const string Subject = "sub" ;
17
+ public const string TokenId = "jti" ;
17
18
public const string TokenType = "token_type" ;
18
19
public const string Username = "username" ;
19
20
}
@@ -30,6 +31,7 @@ public static class Parameters {
30
31
public static class Properties {
31
32
public const string Audiences = ".audiences" ;
32
33
public const string Scopes = ".scopes" ;
34
+ public const string TicketId = ".ticket_id" ;
33
35
public const string Token = "access_token" ;
34
36
}
35
37
Original file line number Diff line number Diff line change @@ -286,6 +286,13 @@ protected virtual async Task<AuthenticationTicket> CreateTicketAsync(string toke
286
286
continue ;
287
287
}
288
288
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
+
289
296
// Extract the scope values from the space-delimited
290
297
// "scope" claim and store them as individual claims.
291
298
// 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 {
14
14
public const string NotBefore = "nbf" ;
15
15
public const string Scope = "scope" ;
16
16
public const string Subject = "sub" ;
17
+ public const string TokenId = "jti" ;
17
18
public const string TokenType = "token_type" ;
18
19
public const string Username = "username" ;
19
20
}
@@ -34,6 +35,7 @@ public static class Parameters {
34
35
public static class Properties {
35
36
public const string Audiences = ".audiences" ;
36
37
public const string Scopes = ".scopes" ;
38
+ public const string TicketId = ".ticket_id" ;
37
39
public const string Token = "access_token" ;
38
40
}
39
41
Original file line number Diff line number Diff line change @@ -275,6 +275,13 @@ protected virtual async Task<AuthenticationTicket> CreateTicketAsync(string toke
275
275
276
276
continue ;
277
277
}
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
+ }
278
285
279
286
// Extract the scope values from the space-delimited
280
287
// "scope" claim and store them as individual claims.
You can’t perform that action at this time.
0 commit comments