forked from IdentityServer/IdentityServer3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of dependency on Katana's
AuthenticationTicket
- Loading branch information
Mo Valipour
committed
Oct 22, 2015
1 parent
cee7647
commit cbd0a61
Showing
4 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace IdentityServer3.Core.Configuration | ||
{ | ||
using System.Collections.Generic; | ||
using System.Security.Claims; | ||
|
||
using Microsoft.Owin.Security; | ||
|
||
/// <summary> | ||
/// A model class represending an authentication ticket | ||
/// </summary> | ||
public class AuthenticationTicketModel | ||
{ | ||
/// <summary> | ||
/// Instantiates an instance of authentication ticket | ||
/// </summary> | ||
public AuthenticationTicketModel(ClaimsIdentity identity, IDictionary<string, string> properties) | ||
{ | ||
this.Identity = identity; | ||
this.Properties = properties; | ||
} | ||
|
||
internal AuthenticationTicketModel(AuthenticationTicket ticket) | ||
: this(ticket.Identity, ticket.Properties.Dictionary) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// The claims identity of the authentication ticket | ||
/// </summary> | ||
public ClaimsIdentity Identity { get; private set; } | ||
|
||
/// <summary> | ||
/// Authentication ticket properties | ||
/// </summary> | ||
public IDictionary<string, string> Properties { get; private set; } | ||
|
||
internal AuthenticationTicket ToAuthenticationTicket() | ||
{ | ||
return new AuthenticationTicket(this.Identity, new AuthenticationProperties(this.Properties)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters