Skip to content

Commit

Permalink
Fix logout token iss claim when issuer is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Dec 13, 2023
1 parent c7dd81b commit 2f575dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/IdentityServer/IdentityServerTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,23 @@ public IdentityServerTools(IServiceProvider serviceProvider, IIssuerNameService
/// <exception cref="System.ArgumentNullException">claims</exception>
public virtual async Task<string> IssueJwtAsync(int lifetime, IEnumerable<Claim> claims)
{
var tokenType = OidcConstants.TokenTypes.AccessToken;
var issuer = await IssuerNameService.GetCurrentAsync();
return await IssueJwtAsync(lifetime, issuer, claims);
return await IssueJwtAsync(lifetime, issuer, tokenType, claims);
}

/// <summary>
/// Issues a JWT.
/// </summary>
/// <param name="lifetime">The lifetime.</param>
/// <param name="issuer">The issuer.</param>
/// <param name="tokenType">The token type.</param>
/// <param name="claims">The claims.</param>
/// <returns></returns>
/// <exception cref="System.ArgumentNullException">claims</exception>
public virtual Task<string> IssueJwtAsync(int lifetime, string issuer, IEnumerable<Claim> claims)
public virtual async Task<string> IssueJwtAsync(int lifetime, string tokenType, IEnumerable<Claim> claims)
{
var tokenType = OidcConstants.TokenTypes.AccessToken;
return IssueJwtAsync(lifetime, issuer, tokenType, claims);
var issuer = await IssuerNameService.GetCurrentAsync();
return await IssueJwtAsync(lifetime, issuer, tokenType, claims);
}

/// <summary>
Expand Down

0 comments on commit 2f575dc

Please sign in to comment.