Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Added client claims settings
Browse files Browse the repository at this point in the history
  • Loading branch information
leastprivilege committed Dec 18, 2014
1 parent eb6c223 commit be0cf51
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions source/Core/Models/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;

namespace Thinktecture.IdentityServer.Core.Models
{
Expand Down Expand Up @@ -150,6 +151,30 @@ public class Client
/// </value>
public bool IncludeJwtId { get; set; }

/// <summary>
/// Gets or sets the client claims.
/// </summary>
/// <value>
/// The claims.
/// </value>
public List<Claim> Claims { get; set; }

/// <summary>
/// Gets or sets a value indicating whether client claims should be always included in the access tokens - or only for client credentials flow.
/// </summary>
/// <value>
/// <c>true</c> if claims should always be sent; otherwise, <c>false</c>.
/// </value>
public bool AlwaysSendClientClaims { get; set; }

/// <summary>
/// Gets or sets a value indicating whether all client claims should be prefixed.
/// </summary>
/// <value>
/// <c>true</c> if client claims should be prefixed; otherwise, <c>false</c>.
/// </value>
public bool PrefixClientClaims { get; set; }

// not implemented yet

//public bool RefreshClaimsOnRefreshToken { get; set; }
Expand All @@ -169,6 +194,11 @@ public Client()
PostLogoutRedirectUris = new List<string>();
IdentityProviderRestrictions = new List<string>();

// client claims settings
Claims = new List<Claim>();
AlwaysSendClientClaims = false;
PrefixClientClaims = true;

// 5 minutes
AuthorizationCodeLifetime = 300;
IdentityTokenLifetime = 300;
Expand Down

1 comment on commit be0cf51

@brockallen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.