public async Task <Consent> LoadAsync(string subject, string client)
        {
            var id     = GuidGenerator.CreateGuid(ConsentConstants.Namespace, client, subject);
            var result = await RetrieveAsync(id);

            return(await result.MakeConsentAsync());
        }
Ejemplo n.º 2
0
 public IdentityResourceDocument(IdentityResource identityResource) : base(identityResource)
 {
     Id = GuidGenerator.CreateGuid(identityResource.Name).ToString();
 }
 public ApiResourceDocument(ApiResource apiResource) : base(apiResource)
 {
     Id = GuidGenerator.CreateGuid(apiResource.Name).ToString();
 }
Ejemplo n.º 4
0
 public RazorLocationDocument(RazorLocation model) : base(model)
 {
     Id = GuidGenerator.CreateGuid(model.Location).ToString();
 }
 public PersistedGrantDocument(PersistedGrant grant) : base(grant)
 {
     Id = GuidGenerator.CreateGuid(grant.Key).ToString();
 }
Ejemplo n.º 6
0
 public static Guid CreateGuid(this IRefreshTokenHandle tokenHandle)
 {
     return(GuidGenerator.CreateGuid(RefreshTokenConstants.Namespace, tokenHandle.Key));
 }
        public async Task RevokeAsync(string subject, string client)
        {
            var id = GuidGenerator.CreateGuid(ConsentConstants.Namespace, client, subject);

            await DeleteAsync(id);
        }
Ejemplo n.º 8
0
 public ClientDocument(Client client) : base(client)
 {
     Id = GuidGenerator.CreateGuid(client.ClientId).ToString();
 }
 public static Guid CreateGuid(this AuthorizationCodeHandle tokenHandle, Guid @namespace)
 {
     return(GuidGenerator.CreateGuid(@namespace, tokenHandle.Key));
 }
 public static Guid CreateGuid <T>(this ComplexDocument <T> obj, Guid @namespace) where T : class
 {
     return(GuidGenerator.CreateGuid(@namespace, obj.DocumentType, obj.DocumentVersion));
 }