Class AuthorizationServerClient
- Assembly
- Keycloak.AuthServices.Authorization.dll
public class AuthorizationServerClient : IAuthorizationServerClient
- Inheritance
-
AuthorizationServerClient
- Implements
- Inherited Members
Constructors
AuthorizationServerClient(HttpClient, IOptions<KeycloakAuthorizationServerOptions>, ILogger<AuthorizationServerClient>)
public AuthorizationServerClient(HttpClient httpClient, IOptions<KeycloakAuthorizationServerOptions> clientOptions, ILogger<AuthorizationServerClient> logger)
Parameters
httpClient
HttpClientclientOptions
IOptions<KeycloakAuthorizationServerOptions>logger
ILogger<AuthorizationServerClient>
Exceptions
Methods
VerifyAccessToResource(string, string, ScopesValidationMode?, CancellationToken)
Verifies access to the protected resource. Sends decision request to token endpoint {resource}#{scope}
public Task<bool> VerifyAccessToResource(string resource, string scope, ScopesValidationMode? scopesValidationMode = null, CancellationToken cancellationToken = default)
Parameters
resource
stringscope
stringscopesValidationMode
ScopesValidationMode?cancellationToken
CancellationToken