Interface IKeycloakProtectedResourceClient
- Namespace
- Keycloak.AuthServices.Sdk.Protection
- Assembly
- Keycloak.AuthServices.Sdk.dll
Must be used by the owner of the resource for whom the policy is being created.
public interface IKeycloakProtectedResourceClient
Methods
CreateResourceAsync(string, Resource, CancellationToken)
Creates resource
Task<ResourceResponse> CreateResourceAsync(string realm, Resource resource, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resource
ResourcecancellationToken
CancellationToken
Returns
CreateResourceWithResponseAsync(string, Resource, CancellationToken)
Creates resource
Task<HttpResponseMessage> CreateResourceWithResponseAsync(string realm, Resource resource, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resource
ResourcecancellationToken
CancellationToken
Returns
DeleteResourceAsync(string, string, CancellationToken)
Deletes a resource
Task DeleteResourceAsync(string realm, string resourceId, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
cancellationToken
CancellationToken
Returns
DeleteResourceWithResponseAsync(string, string, CancellationToken)
Deletes a resource
Task<HttpResponseMessage> DeleteResourceWithResponseAsync(string realm, string resourceId, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
cancellationToken
CancellationToken
Returns
GetResourceAsync(string, string, CancellationToken)
Gets resource by Id
Task<ResourceResponse> GetResourceAsync(string realm, string resourceId, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
cancellationToken
CancellationToken
Returns
GetResourceWithResponseAsync(string, string, CancellationToken)
Gets resource by Id
Task<HttpResponseMessage> GetResourceWithResponseAsync(string realm, string resourceId, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
cancellationToken
CancellationToken
Returns
GetResourcesAsync(string, GetResourcesRequestParameters?, CancellationToken)
Searches for resources
Task<IList<ResourceResponse>> GetResourcesAsync(string realm, GetResourcesRequestParameters? parameters = null, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
parameters
GetResourcesRequestParametersOptional query parameters
cancellationToken
CancellationToken
Returns
GetResourcesIdsAsync(string, GetResourcesRequestParameters?, CancellationToken)
Searches for resource
Task<IList<string>> GetResourcesIdsAsync(string realm, GetResourcesRequestParameters? parameters = null, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
parameters
GetResourcesRequestParametersOptional query parameters
cancellationToken
CancellationToken
Returns
GetResourcesIdsWithResponseAsync(string, GetResourcesRequestParameters?, CancellationToken)
Searches for resource
Task<HttpResponseMessage> GetResourcesIdsWithResponseAsync(string realm, GetResourcesRequestParameters? parameters = null, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
parameters
GetResourcesRequestParametersOptional query parameters
cancellationToken
CancellationToken
Returns
GetResourcesWithResponseAsync(string, GetResourcesRequestParameters?, CancellationToken)
Searches for resources
Task<HttpResponseMessage> GetResourcesWithResponseAsync(string realm, GetResourcesRequestParameters? parameters = null, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
parameters
GetResourcesRequestParametersOptional query parameters
cancellationToken
CancellationToken
Returns
UpdateResourceAsync(string, string, Resource, CancellationToken)
Updates resource
Task UpdateResourceAsync(string realm, string resourceId, Resource resource, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
resource
ResourcecancellationToken
CancellationToken
Returns
Remarks
UpdateResourceWithResponseAsync(string, string, Resource, CancellationToken)
Updates resource
Task<HttpResponseMessage> UpdateResourceWithResponseAsync(string realm, string resourceId, Resource resource, CancellationToken cancellationToken = default)
Parameters
realm
stringRealm name (not ID).
resourceId
stringResource ID.
resource
ResourcecancellationToken
CancellationToken