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));
        }
        public string Protect(AuthenticationTicket data)
        {
            SessionInfo sessionInfo = data.Principal.IntoSessionInfo();

            return(SessionInfoSigner.CreateSignedToken(sessionInfo, secret_));
        }