Esempio n. 1
0
 /// <summary>
 /// Validate token
 /// </summary>
 /// <param name="issuer">issuer</param>
 /// <param name="audience">audience</param>
 /// <param name="secret">secret</param>
 /// <returns></returns>
 public Token Validate(string issuer, string audience, string secret)
 {
     _token = GetTokenFromString(ToString(), issuer, audience, secret);
     Claims = GetClaims(_token);
     return(this);
 }
Esempio n. 2
0
 public ITokenBuilder AddClaims(ClaimCollection claims)
 {
     _descriptor.Claims = claims.ToDictionary(x => x.Key, x => (object)x.Value);
     return(this);
 }
Esempio n. 3
0
 internal Token(SecurityToken token)
 {
     _token = token;
     Claims = GetClaims(token);
 }