예제 #1
0
        public virtual AuthenticationTicket Unprotect(string protectedText)
        {
            var sessionInfo     = SessionInfoSigner.CreateFromSignedToken(protectedText, secret_);
            var claimsIdentity  = new ClaimsIdentity(sessionInfo.IntoClaims(), authenticationType_);
            var claimsPrincipal = new ClaimsPrincipal(claimsIdentity);

            return(new AuthenticationTicket(claimsPrincipal, SessionCookieAuthenticationDefaults.AuthenticationScheme));
        }
예제 #2
0
 public void SetFromSignedToken(string signedToken)
 {
     Value = SessionInfoSigner.CreateFromSignedToken(signedToken, secret_);
 }