Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit 0ce9d9b

Browse files
committed
Incorporate the changes committed in the release branch
2 parents 1675657 + 4bdc5ae commit 0ce9d9b

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

src/AspNet.Security.OAuth.Introspection/OAuthIntrospectionConstants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/AspNet.Security.OAuth.Introspection/OAuthIntrospectionHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/Owin.Security.OAuth.Introspection/OAuthIntrospectionConstants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/Owin.Security.OAuth.Introspection/OAuthIntrospectionHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)