예제 #1
0
        public FrontEnd_JWTInfo Decode_FrontEnd_Token(string token)
        {
            FrontEnd_JWTInfo retVal = null;

            try
            {
                retVal = _decoder.DecodeToObject <FrontEnd_JWTInfo>(token, _secret, verify: true);
            }

            catch (Exception ex)
            {
                // Log in DB
                Console.WriteLine("Illegal base64 exception");
            }

            return(retVal);
        }
예제 #2
0
        public string Generate_FrontEnd_Token(FrontEnd_JWTInfo payload)
        {
            var token = _encoder.Encode(payload, _secret);

            return(token);
        }