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());
        }
示例#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();
 }
示例#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();
 }
示例#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);
        }
 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));
 }