Example #1
0
        public async Task <string> CreateCookieToken(Action <SecurityTokenDescriptor> setupSecurityTokenDescriptor, string encryptionKey, IDictionary <string, string> claims, int expiryPeriodInMinutes, CancellationToken cancellationToken)
        {
            await Task.CompletedTask;
            var defaultEncryptionKey = _cryptographySwitch.Case(encryptionKey);

            return(_jsonWebTokenService.CreateToken(setupSecurityTokenDescriptor,
                                                    _clockProvider.UtcDateTime.AddMinutes(expiryPeriodInMinutes), claims,
                                                    defaultEncryptionKey.Password, Encoding.UTF8));
        }