public IActionResult GetAll()
        {
            var lastKey    = _jsonWebKeyManagerService.GetLastKey()?.PublicKey;
            var currentKey = _jsonWebKeyManagerService.GetCurrentKey().PublicKey;
            var nextKey    = _jsonWebKeyManagerService.GetNextKey().PublicKey;

            var retVal = new List <JsonWebKey>();

            if (lastKey != null)
            {
                retVal.Add(lastKey);
            }
            retVal.AddRange(new [] { currentKey, nextKey });

            return(Ok(retVal));
        }
Esempio n. 2
0
 public Task <SigningCredentials> GetSigningCredentialsAsync()
 {
     return(Task.FromResult(_keyPairManagerService.GetCurrentKey().SigningCredentials));
 }