Beispiel #1
0
        public BackEnd_JWTInfo Decode_BackEnd_JWTInfoToken(string token)
        {
            BackEnd_JWTInfo retVal = null;

            try
            {
                retVal = _decoder.DecodeToObject <BackEnd_JWTInfo>(token, _secret, verify: true);
            }
            catch (Exception ex)
            {
                // Log in DB
                Console.WriteLine("Illegal base64 exception");
            }

            return(retVal);
        }
Beispiel #2
0
        public string Generate_BackEnd_Token(BackEnd_JWTInfo payload)
        {
            var token = _encoder.Encode(payload, _secret);

            return(token);
        }