Ejemplo n.º 1
0
        public Task <JsonWebKey> FindJsonWebKeyById(string kid, CancellationToken cancellationToken)
        {
            var result = LstData.FirstOrDefault(j => j.Kid == kid);

            return(Task.FromResult(result == null ? null : (JsonWebKey)result.Clone()));
        }
Ejemplo n.º 2
0
 public Task <OAuthUser> FindOAuthUserByLogin(string login, CancellationToken token)
 {
     return(Task.FromResult(LstData.FirstOrDefault(u => u.Id == login)));
 }
Ejemplo n.º 3
0
 public Task <OAuthUser> FindOAuthUserByLoginAndCredential(string login, string credentialType, string credentialValue, CancellationToken token)
 {
     return(Task.FromResult(LstData.FirstOrDefault(u => u.Id == login && u.Credentials.Any(c => c.CredentialType == credentialType && c.Value == credentialValue))));
 }
Ejemplo n.º 4
0
 public Task <OAuthUser> FindOAuthUserByClaim(string claimType, string claimValue, CancellationToken token)
 {
     return(Task.FromResult(LstData.FirstOrDefault(u => u.Claims.Any(c => c.Type == claimType && c.Value == claimValue))));
 }
 public Task <OAuthUser> FindOAuthUserByExternalAuthProvider(string scheme, string subject, CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.FirstOrDefault(u => u.ExternalAuthProviders.Any(p => p.Scheme == scheme && p.Subject == subject))));
 }
Ejemplo n.º 6
0
 public Task <UMAPendingRequest> FindByTicketIdentifierAndOwner(string ticketIdentifier, string owner, CancellationToken token)
 {
     return(Task.FromResult(LstData.FirstOrDefault(r => r.TicketId == ticketIdentifier && r.Owner == owner)));
 }
 public Task <UMAResource> FindByIdentifier(string id, CancellationToken token)
 {
     return(Task.FromResult(LstData.FirstOrDefault(r => r.Id == id)));
 }
 public Task <OAuthScope> GetOAuthScope(string name, CancellationToken cancellationToken)
 {
     return(Task.FromResult(LstData.FirstOrDefault(s => s.Name == name)));
 }