Exemple #1
0
        public Task <List <JsonWebKey> > GetActiveJsonWebKeys(CancellationToken cancellationToken)
        {
            var currentDateTime = DateTime.UtcNow;
            var result          = LstData.Where(j => j.ExpirationDateTime == null || currentDateTime < j.ExpirationDateTime).Select(j => (JsonWebKey)j.Clone()).ToList();

            return(Task.FromResult(result));
        }
Exemple #2
0
        public Task <List <JsonWebKey> > FindJsonWebKeys(Usages usage, string alg, KeyOperations[] operations, CancellationToken cancellationToken)
        {
            var currentDateTime = DateTime.UtcNow;
            var result          = LstData.Where(j =>
                                                (j.ExpirationDateTime == null || currentDateTime < j.ExpirationDateTime) &&
                                                (j.Use == usage && j.Alg == alg && operations.All(o => j.KeyOps.Contains(o)))
                                                ).Select(j => (JsonWebKey)j.Clone()).ToList();

            return(Task.FromResult(result));
        }
Exemple #3
0
        public Task <List <JsonWebKey> > GetNotRotatedJsonWebKeys(CancellationToken cancellationToken)
        {
            var result = LstData.Where(j => string.IsNullOrWhiteSpace(j.RotationJWKId)).Select(j => (JsonWebKey)j.Clone()).ToList();

            return(Task.FromResult(result));
        }
Exemple #4
0
 public Task <IEnumerable <UMAPendingRequest> > FindByTicketIdentifier(string ticketIdentifier, CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.Where(r => r.TicketId == ticketIdentifier)));
 }
 public Task <IEnumerable <AuthenticationContextClassReference> > FindACRByNames(IEnumerable <string> names, CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.Where(a => names.Contains(a.Name))));
 }
 public Task <IEnumerable <UMAResource> > FindByIdentifiers(IEnumerable <string> ids, CancellationToken token)
 {
     return(Task.FromResult(LstData.Where(r => ids.Contains(r.Id))));
 }
 public Task <List <OAuthScope> > FindOAuthScopesByNames(IEnumerable <string> names, CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.Where(s => names.Contains(s.Name)).ToList()));
 }
 public Task <List <OAuthScope> > GetAllOAuthScopesExposed(CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.Where(s => s.IsExposedInConfigurationEdp).ToList()));
 }