public Guid Get(string token)
        {
            var claimsPrincipal = _jwtSecurityTokenValidator.Validate(token, _tokenValidationParametersProvider.GetParameters());

            if (claimsPrincipal.FindFirst(ProjectClaims.OtpAuthTokenClaimName) == null)
            {
                throw new BadRequestException("INVALID_OTP_TOKEN");
            }

            return(new Guid(claimsPrincipal.FindFirst(ClaimTypes.NameIdentifier).Value));
        }
        public ClaimsPrincipal Create(string jwtToken)
        {
            var parameters = _tokenValidationParametersProvider.GetParameters();

            try
            {
                return(_jwtSecurityTokenValidator.Validate(jwtToken, parameters));
            }
            catch (Exception)
            {
                return(null);
            }
        }