Table of Contents

Class AuthorizationServerClient

Namespace
Keycloak.AuthServices.Authorization.AuthorizationServer
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 HttpClient
clientOptions IOptions<KeycloakAuthorizationServerOptions>
logger ILogger<AuthorizationServerClient>

Exceptions

ArgumentNullException

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 string
scope string
scopesValidationMode ScopesValidationMode?
cancellationToken CancellationToken

Returns

Task<bool>