Safe HaskellNone





getJWKs :: Keycloak [JWK] Source #

return JWKs from Keycloak. Its a set of keys that can be used to check signed tokens (JWTs)

getJWT :: Username -> Password -> Keycloak JWT Source #

Retrieve the user's token. This token can be used for every other Keycloak calls.

getClientJWT :: Keycloak JWT Source #

return a Client token (linked to a Client, not a User). It is useful to create Resources in that Client in Keycloak.

verifyJWT :: JWK -> JWT -> Keycloak ClaimsSet Source #

Verify a JWT. If sucessful, the claims are returned. Otherwise, a JWTError is thrown.

getClaimsUser :: ClaimsSet -> User Source #

Extract the user identity from a token. Additional attributes can be encoded in the token.

isAuthorized :: ResourceId -> ScopeName -> JWT -> Keycloak Bool Source #

Returns true if the resource is authorized under the given scope.


getPermissions :: [PermReq] -> JWT -> Keycloak [Permission] Source #

Return the permissions for the permission requests.

checkPermission :: ResourceId -> ScopeName -> JWT -> Keycloak () Source #

Checks if a scope is permitted on a resource. An HTTP Exception 403 will be thrown if not.

createResource :: Resource -> JWT -> Keycloak ResourceId Source #

Create an authorization resource in Keycloak, under the configured client.

deleteResource :: ResourceId -> JWT -> Keycloak () Source #

Delete the resource

deleteAllResources :: JWT -> Keycloak () Source #

Delete all resources in Keycloak

getResource :: ResourceId -> JWT -> Keycloak Resource Source #

get a single resource

getAllResourceIds :: Keycloak [ResourceId] Source #

get all resources IDs


getUsers :: Maybe Max -> Maybe First -> Maybe Username -> JWT -> Keycloak [User] Source #

Get users. Default number of users is 100. Parameters max and first allow to paginate and retrieve more than 100 users.

getUser :: UserId -> JWT -> Keycloak User Source #

Get a single user, based on his Id

createUser :: User -> JWT -> Keycloak UserId Source #

Create a user

updateUser :: UserId -> User -> JWT -> Keycloak () Source #

Get a single user, based on his Id