Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit fe9fd87

Browse files
added support for token type hint
1 parent 6542153 commit fe9fd87

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

source/IdentityModel.Shared/Client/IntrospectionClient.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,17 @@ public TimeSpan Timeout
5252

5353
public async Task<IntrospectionResponse> SendAsync(IntrospectionRequest request)
5454
{
55+
if (request == null) throw new ArgumentNullException("request");
56+
if (string.IsNullOrWhiteSpace(request.Token)) throw new ArgumentNullException("token");
57+
5558
var form = new Dictionary<string, string>();
5659
form.Add("token", request.Token);
5760

61+
if (!string.IsNullOrWhiteSpace(request.TokenTypeHint))
62+
{
63+
form.Add("token_type_hint", request.TokenTypeHint);
64+
}
65+
5866
if (string.IsNullOrWhiteSpace(request.ClientId))
5967
{
6068
form.Add("client_id", request.ClientId);

source/IdentityModel.Shared/Client/IntrospectionRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace IdentityModel.Client
1919
public class IntrospectionRequest
2020
{
2121
public string Token { get; set; }
22+
public string TokenTypeHint { get; set; }
2223

2324
public string ClientId { get; set; }
2425
public string ClientSecret { get; set; }

0 commit comments

Comments
 (0)