Repository: Nerzal/gocloak
Pull request #382 (2022-11-03 16:01:32)

fix(client): correct serverinfo endpoint
Hi @Nerzal,

I assume the serverinfo broke with the latest update, it should be one `ServerInfoRepresentation` and the path should be `/serverinfo`, not `/realms`.

Let me know if I'm missing something here?


Best and thanks for all the work, Basti

Nerzal: I guess the test failure is unrelated i'll have to have a closer look at that
bastianccm: Looks like these tests:
https://github.com/Nerzal/gocloak/blob/18f0f3d14cb8dd31a49d357ca37fab0aa8ca337f/client_test.go#L625-L660

As they are marked as parallel, it could be a race condition somehow?
bastianccm: See #396 which should resolve the test issues
codecov[bot]: # [Codecov](https://codecov.io/gh/Nerzal/gocloak/pull/382?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nerzal) Report
> Merging [#382](https://codecov.io/gh/Nerzal/gocloak/pull/382?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nerzal) (18f0f3d) into [main](https://codecov.io/gh/Nerzal/gocloak/commit/18f0f3d14cb8dd31a49d357ca37fab0aa8ca337f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nerzal) (18f0f3d) will **not change** coverage.
> The diff coverage is `n/a`.

> :exclamation: Current head 18f0f3d differs from pull request most recent head 3606b96. Consider uploading reports for the commit 3606b96 to get more accurate results

```diff
@@           Coverage Diff           @@
##             main     #382   +/-   ##
=======================================
  Coverage   77.13%   77.13%           
=======================================
  Files           4        4           
  Lines        2139     2139           
=======================================
  Hits         1650     1650           
  Misses        333      333           
  Partials      156      156           
```



:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nerzal)

bastianccm: @Nerzal i assume the tests failed because keycloak was not yet ready, maybe you can run them again? I rebased the branch so it should work actually

Patch:
diff --git a/Dockerfile b/Dockerfile
index fe10a52..9b88331 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM quay.io/keycloak/keycloak:latest
+FROM quay.io/keycloak/keycloak:19.0
 COPY testdata data/import
 WORKDIR /opt/keycloak
 ENV KC_HOSTNAME=localhost
@@ -8,4 +8,4 @@ ENV KEYCLOAK_ADMIN=admin
 ENV KEYCLOAK_ADMIN_PASSWORD=secret
 ENV KC_FEATURES=account-api,account2,authorization,client-policies,impersonation,docker,scripts,upload_scripts
 RUN /opt/keycloak/bin/kc.sh import --file /data/import/gocloak-realm.json
-ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
\ No newline at end of file
+ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
diff --git a/Makefile b/Makefile
index 1664ecb..0409e81 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
 test:
 	./run-tests.sh
 
-start-keycloak:
+start-keycloak: stop-keycloak
+	docker-compose up -d
+
+stop-keycloak:
 	docker-compose down
-	docker-compose up -d    
\ No newline at end of file
diff --git a/README.md b/README.md
index b1d99fb..9ab5ee2 100644
--- a/README.md
+++ b/README.md
@@ -32,13 +32,13 @@ For release notes please consult the specific releases [here](https://github.com
 ### Installation
 
 ```shell
-go get github.com/Nerzal/gocloak/v12
+go get github.com/Nerzal/gocloak/v13
 ```
 
 ### Importing
 
 ```go
- import "github.com/Nerzal/gocloak/v12"
+ import "github.com/Nerzal/gocloak/v13"
 ```
 
 ### Create New User
@@ -80,7 +80,7 @@ go get github.com/Nerzal/gocloak/v12
   panic("Inspection failed:"+ err.Error())
  }
 
- if !rptResult.Active {
+ if !*rptResult.Active {
   panic("Token is not active")
  }
 
@@ -342,7 +342,14 @@ type GoCloak interface {
  MoveCredentialBehind(ctx context.Context, token, realm, userID, credentialID, newPreviousCredentialID string) error
  MoveCredentialToFirst(ctx context.Context, token, realm, userID, credentialID string) error
 
- // *** Identity Providers ***
+// *** Authentication Flows ***
+GetAuthenticationFlows(ctx context.Context, token, realm string) ([]*AuthenticationFlowRepresentation, error)
+GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (*AuthenticationFlowRepresentation, error)
+CreateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation) error
+UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (*AuthenticationFlowRepresentation, error)
+DeleteAuthenticationFlow(ctx context.Context, token, realm, flowID string) error
+
+// *** Identity Providers ***
 
  CreateIdentityProvider(ctx context.Context, token, realm string, providerRep IdentityProviderRepresentation) (string, error)
  GetIdentityProvider(ctx context.Context, token, realm, alias string) (*IdentityProviderRepresentation, error)
@@ -468,6 +475,18 @@ yields
 
 Note that empty parameters are not included, because of the use of ```omitempty``` in the type definitions.
 
+## Examples
+
+* [Add client role to user](./examples/ADD_CLIENT_ROLE_TO_USER.md)
+
+* [Create User Federation & Sync](./examples/USER_FEDERATION.md)
+
+* [Create User Federation & Sync with group ldap mapper](./examples/USER_FEDERATION_GROUP_LDAP_MAPPER.md)
+
+* [Create User Federation & Sync with role ldap mapper](./examples/USER_FEDERATION_ROLE_LDAP_MAPPER.md)
+
+* [Create User Federation & Sync with user attribute ldap mapper](./examples/USER_FEDERATION_USER_ATTRIBUTE_LDAP_MAPPER.md)
+
 ## License
 
 [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FNerzal%2Fgocloak.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FNerzal%2Fgocloak?ref=badge_large)
diff --git a/client.go b/client.go
index 56482d7..2bc75fe 100644
--- a/client.go
+++ b/client.go
@@ -18,7 +18,7 @@ import (
 	"github.com/pkg/errors"
 	"github.com/segmentio/ksuid"
 
-	"github.com/Nerzal/gocloak/v12/pkg/jwx"
+	"github.com/Nerzal/gocloak/v13/pkg/jwx"
 )
 
 // GoCloak provides functionalities to talk to Keycloak.
@@ -32,8 +32,10 @@ type GoCloak struct {
 		authAdminRealms     string
 		authRealms          string
 		tokenEndpoint       string
+		revokeEndpoint      string
 		logoutEndpoint      string
 		openIDConnect       string
+		attackDetection     string
 	}
 }
 
@@ -46,7 +48,8 @@ func makeURL(path ...string) string {
 	return strings.Join(path, urlSeparator)
 }
 
-func (g *GoCloak) getRequest(ctx context.Context) *resty.Request {
+// GetRequest returns a request for calling endpoints.
+func (g *GoCloak) GetRequest(ctx context.Context) *resty.Request {
 	var err HTTPErrorResponse
 	return injectTracingHeaders(
 		ctx, g.restyClient.R().
@@ -55,27 +58,31 @@ func (g *GoCloak) getRequest(ctx context.Context) *resty.Request {
 	)
 }
 
-func (g *GoCloak) getRequestWithBearerAuthNoCache(ctx context.Context, token string) *resty.Request {
-	return g.getRequest(ctx).
+// GetRequestWithBearerAuthNoCache returns a JSON base request configured with an auth token and no-cache header.
+func (g *GoCloak) GetRequestWithBearerAuthNoCache(ctx context.Context, token string) *resty.Request {
+	return g.GetRequest(ctx).
 		SetAuthToken(token).
 		SetHeader("Content-Type", "application/json").
 		SetHeader("Cache-Control", "no-cache")
 }
 
-func (g *GoCloak) getRequestWithBearerAuth(ctx context.Context, token string) *resty.Request {
-	return g.getRequest(ctx).
+// GetRequestWithBearerAuth returns a JSON base request configured with an auth token.
+func (g *GoCloak) GetRequestWithBearerAuth(ctx context.Context, token string) *resty.Request {
+	return g.GetRequest(ctx).
 		SetAuthToken(token).
 		SetHeader("Content-Type", "application/json")
 }
 
-func (g *GoCloak) getRequestWithBearerAuthXMLHeader(ctx context.Context, token string) *resty.Request {
-	return g.getRequest(ctx).
+// GetRequestWithBearerAuthXMLHeader returns an XML base request configured with an auth token.
+func (g *GoCloak) GetRequestWithBearerAuthXMLHeader(ctx context.Context, token string) *resty.Request {
+	return g.GetRequest(ctx).
 		SetAuthToken(token).
 		SetHeader("Content-Type", "application/xml;charset=UTF-8")
 }
 
-func (g *GoCloak) getRequestWithBasicAuth(ctx context.Context, clientID, clientSecret string) *resty.Request {
-	req := g.getRequest(ctx).
+// GetRequestWithBasicAuth returns a form data base request configured with basic auth.
+func (g *GoCloak) GetRequestWithBasicAuth(ctx context.Context, clientID, clientSecret string) *resty.Request {
+	req := g.GetRequest(ctx).
 		SetHeader("Content-Type", "application/x-www-form-urlencoded")
 	// Public client doesn't require Basic Auth
 	if len(clientID) > 0 && len(clientSecret) > 0 {
@@ -87,7 +94,7 @@ func (g *GoCloak) getRequestWithBasicAuth(ctx context.Context, clientID, clientS
 }
 
 func (g *GoCloak) getRequestingParty(ctx context.Context, token string, realm string, options RequestingPartyTokenOptions, res interface{}) (*resty.Response, error) {
-	return g.getRequestWithBearerAuth(ctx, token).
+	return g.GetRequestWithBearerAuth(ctx, token).
 		SetFormData(options.FormData()).
 		SetFormDataFromValues(url.Values{"permission": PStringSlice(options.Permissions)}).
 		SetResult(&res).
@@ -184,7 +191,9 @@ func NewClient(basePath string, options ...func(*GoCloak)) *GoCloak {
 	c.Config.authRealms = makeURL("realms")
 	c.Config.tokenEndpoint = makeURL("protocol", "openid-connect", "token")
 	c.Config.logoutEndpoint = makeURL("protocol", "openid-connect", "logout")
+	c.Config.revokeEndpoint = makeURL("protocol", "openid-connect", "revoke")
 	c.Config.openIDConnect = makeURL("protocol", "openid-connect")
+	c.Config.attackDetection = makeURL("attack-detection", "brute-force")
 
 	for _, option := range options {
 		option(&c)
@@ -214,6 +223,11 @@ func (g *GoCloak) getAdminRealmURL(realm string, path ...string) string {
 	return makeURL(path...)
 }
 
+func (g *GoCloak) getAttackDetectionURL(realm string, user string, path ...string) string {
+	path = append([]string{g.basePath, g.Config.authAdminRealms, realm, g.Config.attackDetection, user}, path...)
+	return makeURL(path...)
+}
+
 // ==== Functional Options ===
 
 // SetLegacyWildFlySupport maintain legacy WildFly support.
@@ -245,6 +259,13 @@ func SetTokenEndpoint(url string) func(g *GoCloak) {
 	}
 }
 
+// SetRevokeEndpoint sets the revoke endpoint
+func SetRevokeEndpoint(url string) func(g *GoCloak) {
+	return func(g *GoCloak) {
+		g.Config.revokeEndpoint = url
+	}
+}
+
 // SetLogoutEndpoint sets the logout
 func SetLogoutEndpoint(url string) func(g *GoCloak) {
 	return func(g *GoCloak) {
@@ -267,13 +288,13 @@ func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoCloak) {
 }
 
 // GetServerInfo fetches the server info.
-func (g *GoCloak) GetServerInfo(ctx context.Context, accessToken string) ([]*ServerInfoRepresentation, error) {
+func (g *GoCloak) GetServerInfo(ctx context.Context, accessToken string) (*ServerInfoRepresentation, error) {
 	errMessage := "could not get server info"
-	var result []*ServerInfoRepresentation
+	var result *ServerInfoRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
-		Get(makeURL(g.basePath, "admin", "realms"))
+		Get(makeURL(g.basePath, "admin", "serverinfo"))
 
 	if err := checkForError(resp, err, errMessage); err != nil {
 		return nil, err
@@ -287,7 +308,7 @@ func (g *GoCloak) GetUserInfo(ctx context.Context, accessToken, realm string) (*
 	const errMessage = "could not get user info"
 
 	var result UserInfo
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, g.Config.openIDConnect, "userinfo"))
 
@@ -303,7 +324,7 @@ func (g *GoCloak) GetRawUserInfo(ctx context.Context, accessToken, realm string)
 	const errMessage = "could not get user info"
 
 	var result map[string]interface{}
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, g.Config.openIDConnect, "userinfo"))
 
@@ -318,7 +339,7 @@ func (g *GoCloak) getNewCerts(ctx context.Context, realm string) (*CertResponse,
 	const errMessage = "could not get newCerts"
 
 	var result CertResponse
-	resp, err := g.getRequest(ctx).
+	resp, err := g.GetRequest(ctx).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, g.Config.openIDConnect, "certs"))
 
@@ -362,7 +383,7 @@ func (g *GoCloak) GetIssuer(ctx context.Context, realm string) (*IssuerResponse,
 	const errMessage = "could not get issuer"
 
 	var result IssuerResponse
-	resp, err := g.getRequest(ctx).
+	resp, err := g.GetRequest(ctx).
 		SetResult(&result).
 		Get(g.getRealmURL(realm))
 
@@ -378,7 +399,7 @@ func (g *GoCloak) RetrospectToken(ctx context.Context, accessToken, clientID, cl
 	const errMessage = "could not introspect requesting party token"
 
 	var result IntroSpectTokenResult
-	resp, err := g.getRequestWithBasicAuth(ctx, clientID, clientSecret).
+	resp, err := g.GetRequestWithBasicAuth(ctx, clientID, clientSecret).
 		SetFormData(map[string]string{
 			"token_type_hint": "requesting_party_token",
 			"token":           accessToken,
@@ -445,9 +466,9 @@ func (g *GoCloak) GetToken(ctx context.Context, realm string, options TokenOptio
 	var req *resty.Request
 
 	if !NilOrEmpty(options.ClientSecret) {
-		req = g.getRequestWithBasicAuth(ctx, *options.ClientID, *options.ClientSecret)
+		req = g.GetRequestWithBasicAuth(ctx, *options.ClientID, *options.ClientSecret)
 	} else {
-		req = g.getRequest(ctx)
+		req = g.GetRequest(ctx)
 	}
 
 	resp, err := req.SetFormData(options.FormData()).
@@ -613,7 +634,7 @@ func (g *GoCloak) LoginOtp(ctx context.Context, clientID, clientSecret, realm, u
 func (g *GoCloak) Logout(ctx context.Context, clientID, clientSecret, realm, refreshToken string) error {
 	const errMessage = "could not logout"
 
-	resp, err := g.getRequestWithBasicAuth(ctx, clientID, clientSecret).
+	resp, err := g.GetRequestWithBasicAuth(ctx, clientID, clientSecret).
 		SetFormData(map[string]string{
 			"client_id":     clientID,
 			"refresh_token": refreshToken,
@@ -627,7 +648,7 @@ func (g *GoCloak) Logout(ctx context.Context, clientID, clientSecret, realm, ref
 func (g *GoCloak) LogoutPublicClient(ctx context.Context, clientID, realm, accessToken, refreshToken string) error {
 	const errMessage = "could not logout public client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetFormData(map[string]string{
 			"client_id":     clientID,
 			"refresh_token": refreshToken,
@@ -641,7 +662,7 @@ func (g *GoCloak) LogoutPublicClient(ctx context.Context, clientID, realm, acces
 func (g *GoCloak) LogoutAllSessions(ctx context.Context, accessToken, realm, userID string) error {
 	const errMessage = "could not logout"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		Post(g.getAdminRealmURL(realm, "users", userID, "logout"))
 
 	return checkForError(resp, err, errMessage)
@@ -651,7 +672,7 @@ func (g *GoCloak) LogoutAllSessions(ctx context.Context, accessToken, realm, use
 func (g *GoCloak) RevokeUserConsents(ctx context.Context, accessToken, realm, userID, clientID string) error {
 	const errMessage = "could not revoke consents"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "consents", clientID))
 
 	return checkForError(resp, err, errMessage)
@@ -661,7 +682,7 @@ func (g *GoCloak) RevokeUserConsents(ctx context.Context, accessToken, realm, us
 func (g *GoCloak) LogoutUserSession(ctx context.Context, accessToken, realm, session string) error {
 	const errMessage = "could not logout"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		Delete(g.getAdminRealmURL(realm, "sessions", session))
 
 	return checkForError(resp, err, errMessage)
@@ -676,7 +697,7 @@ func (g *GoCloak) ExecuteActionsEmail(ctx context.Context, token, realm string,
 		return errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(params.Actions).
 		SetQueryParams(queryParams).
 		Put(g.getAdminRealmURL(realm, "users", *(params.UserID), "execute-actions-email"))
@@ -699,7 +720,7 @@ func (g *GoCloak) SendVerifyEmail(ctx context.Context, token, userID, realm stri
 		}
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetQueryParams(queryParams).
 		Put(g.getAdminRealmURL(realm, "users", userID, "send-verify-email"))
 
@@ -710,7 +731,7 @@ func (g *GoCloak) SendVerifyEmail(ctx context.Context, token, userID, realm stri
 func (g *GoCloak) CreateGroup(ctx context.Context, token, realm string, group Group) (string, error) {
 	const errMessage = "could not create group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(group).
 		Post(g.getAdminRealmURL(realm, "groups"))
 
@@ -724,7 +745,7 @@ func (g *GoCloak) CreateGroup(ctx context.Context, token, realm string, group Gr
 func (g *GoCloak) CreateChildGroup(ctx context.Context, token, realm, groupID string, group Group) (string, error) {
 	const errMessage = "could not create child group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(group).
 		Post(g.getAdminRealmURL(realm, "groups", groupID, "children"))
 
@@ -739,7 +760,7 @@ func (g *GoCloak) CreateChildGroup(ctx context.Context, token, realm, groupID st
 func (g *GoCloak) CreateComponent(ctx context.Context, token, realm string, component Component) (string, error) {
 	const errMessage = "could not create component"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(component).
 		Post(g.getAdminRealmURL(realm, "components"))
 
@@ -754,7 +775,7 @@ func (g *GoCloak) CreateComponent(ctx context.Context, token, realm string, comp
 func (g *GoCloak) CreateClient(ctx context.Context, accessToken, realm string, newClient Client) (string, error) {
 	const errMessage = "could not create client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetBody(newClient).
 		Post(g.getAdminRealmURL(realm, "clients"))
 
@@ -771,7 +792,7 @@ func (g *GoCloak) CreateClientRepresentation(ctx context.Context, token, realm s
 
 	var result Client
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(newClient).
 		Post(g.getRealmURL(realm, "clients-registrations", "default"))
@@ -787,7 +808,7 @@ func (g *GoCloak) CreateClientRepresentation(ctx context.Context, token, realm s
 func (g *GoCloak) CreateClientRole(ctx context.Context, token, realm, idOfClient string, role Role) (string, error) {
 	const errMessage = "could not create client role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(role).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "roles"))
 
@@ -802,7 +823,7 @@ func (g *GoCloak) CreateClientRole(ctx context.Context, token, realm, idOfClient
 func (g *GoCloak) CreateClientScope(ctx context.Context, token, realm string, scope ClientScope) (string, error) {
 	const errMessage = "could not create client scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(scope).
 		Post(g.getAdminRealmURL(realm, "client-scopes"))
 
@@ -817,7 +838,7 @@ func (g *GoCloak) CreateClientScope(ctx context.Context, token, realm string, sc
 func (g *GoCloak) CreateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) (string, error) {
 	const errMessage = "could not create client scope protocol mapper"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(protocolMapper).
 		Post(g.getAdminRealmURL(realm, "client-scopes", scopeID, "protocol-mappers", "models"))
 
@@ -835,7 +856,7 @@ func (g *GoCloak) UpdateGroup(ctx context.Context, token, realm string, updatedG
 	if NilOrEmpty(updatedGroup.ID) {
 		return errors.Wrap(errors.New("ID of a group required"), errMessage)
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(updatedGroup).
 		Put(g.getAdminRealmURL(realm, "groups", PString(updatedGroup.ID)))
 
@@ -850,7 +871,7 @@ func (g *GoCloak) UpdateClient(ctx context.Context, token, realm string, updated
 		return errors.Wrap(errors.New("ID of a client required"), errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(updatedClient).
 		Put(g.getAdminRealmURL(realm, "clients", PString(updatedClient.ID)))
 
@@ -867,7 +888,7 @@ func (g *GoCloak) UpdateClientRepresentation(ctx context.Context, accessToken, r
 
 	var result Client
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		SetBody(updatedClient).
 		Put(g.getRealmURL(realm, "clients-registrations", "default", PString(updatedClient.ClientID)))
@@ -883,7 +904,7 @@ func (g *GoCloak) UpdateClientRepresentation(ctx context.Context, accessToken, r
 func (g *GoCloak) UpdateRole(ctx context.Context, token, realm, idOfClient string, role Role) error {
 	const errMessage = "could not update role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(role).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "roles", PString(role.Name)))
 
@@ -894,7 +915,7 @@ func (g *GoCloak) UpdateRole(ctx context.Context, token, realm, idOfClient strin
 func (g *GoCloak) UpdateClientScope(ctx context.Context, token, realm string, scope ClientScope) error {
 	const errMessage = "could not update client scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(scope).
 		Put(g.getAdminRealmURL(realm, "client-scopes", PString(scope.ID)))
 
@@ -905,7 +926,7 @@ func (g *GoCloak) UpdateClientScope(ctx context.Context, token, realm string, sc
 func (g *GoCloak) UpdateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) error {
 	const errMessage = "could not update client scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(protocolMapper).
 		Put(g.getAdminRealmURL(realm, "client-scopes", scopeID, "protocol-mappers", "models", PString(protocolMapper.ID)))
 
@@ -916,7 +937,7 @@ func (g *GoCloak) UpdateClientScopeProtocolMapper(ctx context.Context, token, re
 func (g *GoCloak) DeleteGroup(ctx context.Context, token, realm, groupID string) error {
 	const errMessage = "could not delete group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "groups", groupID))
 
 	return checkForError(resp, err, errMessage)
@@ -926,7 +947,7 @@ func (g *GoCloak) DeleteGroup(ctx context.Context, token, realm, groupID string)
 func (g *GoCloak) DeleteClient(ctx context.Context, token, realm, idOfClient string) error {
 	const errMessage = "could not delete client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient))
 
 	return checkForError(resp, err, errMessage)
@@ -936,7 +957,7 @@ func (g *GoCloak) DeleteClient(ctx context.Context, token, realm, idOfClient str
 func (g *GoCloak) DeleteComponent(ctx context.Context, token, realm, componentID string) error {
 	const errMessage = "could not delete component"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "components", componentID))
 
 	return checkForError(resp, err, errMessage)
@@ -946,7 +967,7 @@ func (g *GoCloak) DeleteComponent(ctx context.Context, token, realm, componentID
 func (g *GoCloak) DeleteClientRepresentation(ctx context.Context, accessToken, realm, clientID string) error {
 	const errMessage = "could not delete client representation"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		Delete(g.getRealmURL(realm, "clients-registrations", "default", clientID))
 
 	return checkForError(resp, err, errMessage)
@@ -956,7 +977,7 @@ func (g *GoCloak) DeleteClientRepresentation(ctx context.Context, accessToken, r
 func (g *GoCloak) DeleteClientRole(ctx context.Context, token, realm, idOfClient, roleName string) error {
 	const errMessage = "could not delete client role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "roles", roleName))
 
 	return checkForError(resp, err, errMessage)
@@ -966,7 +987,7 @@ func (g *GoCloak) DeleteClientRole(ctx context.Context, token, realm, idOfClient
 func (g *GoCloak) DeleteClientScope(ctx context.Context, token, realm, scopeID string) error {
 	const errMessage = "could not delete client scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "client-scopes", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -976,7 +997,7 @@ func (g *GoCloak) DeleteClientScope(ctx context.Context, token, realm, scopeID s
 func (g *GoCloak) DeleteClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) error {
 	const errMessage = "could not delete client scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "client-scopes", scopeID, "protocol-mappers", "models", protocolMapperID))
 
 	return checkForError(resp, err, errMessage)
@@ -988,7 +1009,7 @@ func (g *GoCloak) GetClient(ctx context.Context, token, realm, idOfClient string
 
 	var result Client
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient))
 
@@ -1005,7 +1026,7 @@ func (g *GoCloak) GetClientRepresentation(ctx context.Context, accessToken, real
 
 	var result Client
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, "clients-registrations", "default", clientID))
 
@@ -1022,7 +1043,7 @@ func (g *GoCloak) GetAdapterConfiguration(ctx context.Context, accessToken, real
 
 	var result AdapterConfiguration
 
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, "clients-registrations", "install", clientID))
 
@@ -1039,7 +1060,7 @@ func (g *GoCloak) GetClientsDefaultScopes(ctx context.Context, token, realm, idO
 
 	var result []*ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "default-client-scopes"))
 
@@ -1054,7 +1075,7 @@ func (g *GoCloak) GetClientsDefaultScopes(ctx context.Context, token, realm, idO
 func (g *GoCloak) AddDefaultScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) error {
 	const errMessage = "could not add default scope to client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "default-client-scopes", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -1064,7 +1085,7 @@ func (g *GoCloak) AddDefaultScopeToClient(ctx context.Context, token, realm, idO
 func (g *GoCloak) RemoveDefaultScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) error {
 	const errMessage = "could not remove default scope from client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "default-client-scopes", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -1076,7 +1097,7 @@ func (g *GoCloak) GetClientsOptionalScopes(ctx context.Context, token, realm, id
 
 	var result []*ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "optional-client-scopes"))
 
@@ -1091,7 +1112,7 @@ func (g *GoCloak) GetClientsOptionalScopes(ctx context.Context, token, realm, id
 func (g *GoCloak) AddOptionalScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) error {
 	const errMessage = "could not add optional scope to client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "optional-client-scopes", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -1101,7 +1122,7 @@ func (g *GoCloak) AddOptionalScopeToClient(ctx context.Context, token, realm, id
 func (g *GoCloak) RemoveOptionalScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) error {
 	const errMessage = "could not remove optional scope from client"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "optional-client-scopes", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -1113,7 +1134,7 @@ func (g *GoCloak) GetDefaultOptionalClientScopes(ctx context.Context, token, rea
 
 	var result []*ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "default-optional-client-scopes"))
 
@@ -1130,7 +1151,7 @@ func (g *GoCloak) GetDefaultDefaultClientScopes(ctx context.Context, token, real
 
 	var result []*ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "default-default-client-scopes"))
 
@@ -1147,7 +1168,7 @@ func (g *GoCloak) GetClientScope(ctx context.Context, token, realm, scopeID stri
 
 	var result ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", scopeID))
 
@@ -1164,7 +1185,7 @@ func (g *GoCloak) GetClientScopes(ctx context.Context, token, realm string) ([]*
 
 	var result []*ClientScope
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes"))
 
@@ -1181,7 +1202,7 @@ func (g *GoCloak) GetClientScopeProtocolMappers(ctx context.Context, token, real
 
 	var result []*ProtocolMappers
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", scopeID, "protocol-mappers", "models"))
 
@@ -1198,7 +1219,7 @@ func (g *GoCloak) GetClientScopeProtocolMapper(ctx context.Context, token, realm
 
 	var result *ProtocolMappers
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", scopeID, "protocol-mappers", "models", protocolMapperID))
 
@@ -1215,7 +1236,7 @@ func (g *GoCloak) GetClientScopeMappings(ctx context.Context, token, realm, idOf
 
 	var result *MappingsRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings"))
 
@@ -1232,7 +1253,7 @@ func (g *GoCloak) GetClientScopeMappingsRealmRoles(ctx context.Context, token, r
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "realm"))
 
@@ -1249,7 +1270,7 @@ func (g *GoCloak) GetClientScopeMappingsRealmRolesAvailable(ctx context.Context,
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "realm", "available"))
 
@@ -1264,7 +1285,7 @@ func (g *GoCloak) GetClientScopeMappingsRealmRolesAvailable(ctx context.Context,
 func (g *GoCloak) CreateClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error {
 	const errMessage = "could not create realm-level roles to the client’s scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "realm"))
 
@@ -1275,7 +1296,7 @@ func (g *GoCloak) CreateClientScopeMappingsRealmRoles(ctx context.Context, token
 func (g *GoCloak) DeleteClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error {
 	const errMessage = "could not delete realm-level roles from the client’s scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "realm"))
 
@@ -1288,7 +1309,7 @@ func (g *GoCloak) GetClientScopeMappingsClientRoles(ctx context.Context, token,
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "clients", idOfSelectedClient))
 
@@ -1305,7 +1326,7 @@ func (g *GoCloak) GetClientScopeMappingsClientRolesAvailable(ctx context.Context
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "clients", idOfSelectedClient, "available"))
 
@@ -1320,7 +1341,7 @@ func (g *GoCloak) GetClientScopeMappingsClientRolesAvailable(ctx context.Context
 func (g *GoCloak) CreateClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error {
 	const errMessage = "could not create client-level roles from the client’s scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "clients", idOfSelectedClient))
 
@@ -1331,7 +1352,7 @@ func (g *GoCloak) CreateClientScopeMappingsClientRoles(ctx context.Context, toke
 func (g *GoCloak) DeleteClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error {
 	const errMessage = "could not delete client-level roles from the client’s scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "scope-mappings", "clients", idOfSelectedClient))
 
@@ -1344,7 +1365,7 @@ func (g *GoCloak) GetClientSecret(ctx context.Context, token, realm, idOfClient
 
 	var result CredentialRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "client-secret"))
 
@@ -1360,7 +1381,7 @@ func (g *GoCloak) GetClientServiceAccount(ctx context.Context, token, realm, idO
 	const errMessage = "could not get client service account"
 
 	var result User
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "service-account-user"))
 
@@ -1376,7 +1397,7 @@ func (g *GoCloak) RegenerateClientSecret(ctx context.Context, token, realm, idOf
 	const errMessage = "could not regenerate client secret"
 
 	var result CredentialRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "client-secret"))
 
@@ -1392,7 +1413,7 @@ func (g *GoCloak) GetClientOfflineSessions(ctx context.Context, token, realm, id
 	const errMessage = "could not get client offline sessions"
 
 	var res []*UserSessionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&res).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "offline-sessions"))
 
@@ -1408,7 +1429,7 @@ func (g *GoCloak) GetClientUserSessions(ctx context.Context, token, realm, idOfC
 	const errMessage = "could not get client user sessions"
 
 	var res []*UserSessionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&res).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "user-sessions"))
 
@@ -1423,7 +1444,7 @@ func (g *GoCloak) GetClientUserSessions(ctx context.Context, token, realm, idOfC
 func (g *GoCloak) CreateClientProtocolMapper(ctx context.Context, token, realm, idOfClient string, mapper ProtocolMapperRepresentation) (string, error) {
 	const errMessage = "could not create client protocol mapper"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(mapper).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "protocol-mappers", "models"))
 
@@ -1438,7 +1459,7 @@ func (g *GoCloak) CreateClientProtocolMapper(ctx context.Context, token, realm,
 func (g *GoCloak) UpdateClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string, mapper ProtocolMapperRepresentation) error {
 	const errMessage = "could not update client protocol mapper"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(mapper).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "protocol-mappers", "models", mapperID))
 
@@ -1449,7 +1470,7 @@ func (g *GoCloak) UpdateClientProtocolMapper(ctx context.Context, token, realm,
 func (g *GoCloak) DeleteClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string) error {
 	const errMessage = "could not delete client protocol mapper"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "protocol-mappers", "models", mapperID))
 
 	return checkForError(resp, err, errMessage)
@@ -1460,7 +1481,7 @@ func (g *GoCloak) GetKeyStoreConfig(ctx context.Context, token, realm string) (*
 	const errMessage = "could not get key store config"
 
 	var result KeyStoreConfig
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "keys"))
 
@@ -1476,7 +1497,7 @@ func (g *GoCloak) GetComponents(ctx context.Context, token, realm string) ([]*Co
 	const errMessage = "could not get components"
 
 	var result []*Component
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "components"))
 
@@ -1496,7 +1517,7 @@ func (g *GoCloak) GetComponentsWithParams(ctx context.Context, token, realm stri
 	if err != nil {
 		return nil, errors.Wrap(err, errMessage)
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "components"))
@@ -1515,7 +1536,7 @@ func (g *GoCloak) GetComponent(ctx context.Context, token, realm string, compone
 
 	componentURL := fmt.Sprintf("components/%s", componentID)
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, componentURL))
 
@@ -1530,7 +1551,7 @@ func (g *GoCloak) GetComponent(ctx context.Context, token, realm string, compone
 func (g *GoCloak) UpdateComponent(ctx context.Context, token, realm string, component Component) error {
 	const errMessage = "could not update component"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(component).
 		Put(g.getAdminRealmURL(realm, "components", PString(component.ID)))
 
@@ -1543,7 +1564,7 @@ func (g *GoCloak) GetDefaultGroups(ctx context.Context, token, realm string) ([]
 
 	var result []*Group
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "default-groups"))
 
@@ -1558,7 +1579,7 @@ func (g *GoCloak) GetDefaultGroups(ctx context.Context, token, realm string) ([]
 func (g *GoCloak) AddDefaultGroup(ctx context.Context, token, realm, groupID string) error {
 	const errMessage = "could not add default group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Put(g.getAdminRealmURL(realm, "default-groups", groupID))
 
 	return checkForError(resp, err, errMessage)
@@ -1568,7 +1589,7 @@ func (g *GoCloak) AddDefaultGroup(ctx context.Context, token, realm, groupID str
 func (g *GoCloak) RemoveDefaultGroup(ctx context.Context, token, realm, groupID string) error {
 	const errMessage = "could not remove default group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "default-groups", groupID))
 
 	return checkForError(resp, err, errMessage)
@@ -1578,7 +1599,7 @@ func (g *GoCloak) getRoleMappings(ctx context.Context, token, realm, path, objec
 	const errMessage = "could not get role mappings"
 
 	var result MappingsRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, path, objectID, "role-mappings"))
 
@@ -1605,7 +1626,7 @@ func (g *GoCloak) GetGroup(ctx context.Context, token, realm, groupID string) (*
 
 	var result Group
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID))
 
@@ -1622,7 +1643,7 @@ func (g *GoCloak) GetGroupByPath(ctx context.Context, token, realm, groupPath st
 
 	var result Group
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "group-by-path", groupPath))
 
@@ -1643,7 +1664,7 @@ func (g *GoCloak) GetGroups(ctx context.Context, token, realm string, params Get
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "groups"))
@@ -1660,7 +1681,7 @@ func (g *GoCloak) GetGroupsByRole(ctx context.Context, token, realm string, role
 	const errMessage = "could not get groups"
 
 	var result []*Group
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles", roleName, "groups"))
 
@@ -1676,7 +1697,7 @@ func (g *GoCloak) GetGroupsByClientRole(ctx context.Context, token, realm string
 	const errMessage = "could not get groups"
 
 	var result []*Group
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", clientID, "roles", roleName, "groups"))
 
@@ -1696,7 +1717,7 @@ func (g *GoCloak) GetGroupsCount(ctx context.Context, token, realm string, param
 	if err != nil {
 		return 0, errors.Wrap(err, errMessage)
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "groups", "count"))
@@ -1718,7 +1739,7 @@ func (g *GoCloak) GetGroupMembers(ctx context.Context, token, realm, groupID str
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "members"))
@@ -1740,7 +1761,7 @@ func (g *GoCloak) GetClientRoles(ctx context.Context, token, realm, idOfClient s
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "roles"))
@@ -1757,7 +1778,7 @@ func (g *GoCloak) GetClientRoleByID(ctx context.Context, token, realm, roleID st
 	const errMessage = "could not get client role"
 
 	var result Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles-by-id", roleID))
 
@@ -1773,7 +1794,7 @@ func (g *GoCloak) GetClientRolesByUserID(ctx context.Context, token, realm, idOf
 	const errMessage = "could not client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "clients", idOfClient))
 
@@ -1789,7 +1810,7 @@ func (g *GoCloak) GetClientRolesByGroupID(ctx context.Context, token, realm, idO
 	const errMessage = "could not get client roles by group id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "clients", idOfClient))
 
@@ -1805,7 +1826,7 @@ func (g *GoCloak) GetCompositeClientRolesByRoleID(ctx context.Context, token, re
 	const errMessage = "could not get composite client roles by role id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles-by-id", roleID, "composites", "clients", idOfClient))
 
@@ -1821,7 +1842,7 @@ func (g *GoCloak) GetCompositeClientRolesByUserID(ctx context.Context, token, re
 	const errMessage = "could not get composite client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "clients", idOfClient, "composite"))
 
@@ -1837,7 +1858,7 @@ func (g *GoCloak) GetAvailableClientRolesByUserID(ctx context.Context, token, re
 	const errMessage = "could not get available client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "clients", idOfClient, "available"))
 
@@ -1853,7 +1874,7 @@ func (g *GoCloak) GetAvailableClientRolesByGroupID(ctx context.Context, token, r
 	const errMessage = "could not get available client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "clients", idOfClient, "available"))
 
@@ -1869,7 +1890,7 @@ func (g *GoCloak) GetCompositeClientRolesByGroupID(ctx context.Context, token, r
 	const errMessage = "could not get composite client roles by group id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "clients", idOfClient, "composite"))
 
@@ -1885,7 +1906,7 @@ func (g *GoCloak) GetClientRole(ctx context.Context, token, realm, idOfClient, r
 	const errMessage = "could not get client role"
 
 	var result Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "roles", roleName))
 
@@ -1905,7 +1926,7 @@ func (g *GoCloak) GetClients(ctx context.Context, token, realm string, params Ge
 	if err != nil {
 		return nil, errors.Wrap(err, errMessage)
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "clients"))
@@ -1935,7 +1956,7 @@ func UserAttributeContains(attributes map[string][]string, attribute, value stri
 func (g *GoCloak) CreateRealmRole(ctx context.Context, token string, realm string, role Role) (string, error) {
 	const errMessage = "could not create realm role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(role).
 		Post(g.getAdminRealmURL(realm, "roles"))
 
@@ -1952,7 +1973,7 @@ func (g *GoCloak) GetRealmRole(ctx context.Context, token, realm, roleName strin
 
 	var result Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles", roleName))
 
@@ -1968,7 +1989,7 @@ func (g *GoCloak) GetRealmRoleByID(ctx context.Context, token, realm, roleID str
 	const errMessage = "could not get realm role"
 
 	var result Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles-by-id", roleID))
 
@@ -1989,7 +2010,7 @@ func (g *GoCloak) GetRealmRoles(ctx context.Context, token, realm string, params
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "roles"))
@@ -2006,7 +2027,7 @@ func (g *GoCloak) GetRealmRolesByUserID(ctx context.Context, token, realm, userI
 	const errMessage = "could not get realm roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "realm"))
 
@@ -2022,7 +2043,7 @@ func (g *GoCloak) GetRealmRolesByGroupID(ctx context.Context, token, realm, grou
 	const errMessage = "could not get realm roles by group id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "realm"))
 
@@ -2037,7 +2058,7 @@ func (g *GoCloak) GetRealmRolesByGroupID(ctx context.Context, token, realm, grou
 func (g *GoCloak) UpdateRealmRole(ctx context.Context, token, realm, roleName string, role Role) error {
 	const errMessage = "could not update realm role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(role).
 		Put(g.getAdminRealmURL(realm, "roles", roleName))
 
@@ -2048,7 +2069,7 @@ func (g *GoCloak) UpdateRealmRole(ctx context.Context, token, realm, roleName st
 func (g *GoCloak) UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) error {
 	const errMessage = "could not update realm role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(role).
 		Put(g.getAdminRealmURL(realm, "roles-by-id", roleID))
 
@@ -2059,7 +2080,7 @@ func (g *GoCloak) UpdateRealmRoleByID(ctx context.Context, token, realm, roleID
 func (g *GoCloak) DeleteRealmRole(ctx context.Context, token, realm, roleName string) error {
 	const errMessage = "could not delete realm role"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "roles", roleName))
 
 	return checkForError(resp, err, errMessage)
@@ -2069,7 +2090,7 @@ func (g *GoCloak) DeleteRealmRole(ctx context.Context, token, realm, roleName st
 func (g *GoCloak) AddRealmRoleToUser(ctx context.Context, token, realm, userID string, roles []Role) error {
 	const errMessage = "could not add realm role to user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "realm"))
 
@@ -2080,7 +2101,7 @@ func (g *GoCloak) AddRealmRoleToUser(ctx context.Context, token, realm, userID s
 func (g *GoCloak) DeleteRealmRoleFromUser(ctx context.Context, token, realm, userID string, roles []Role) error {
 	const errMessage = "could not delete realm role from user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "realm"))
 
@@ -2091,7 +2112,7 @@ func (g *GoCloak) DeleteRealmRoleFromUser(ctx context.Context, token, realm, use
 func (g *GoCloak) AddRealmRoleToGroup(ctx context.Context, token, realm, groupID string, roles []Role) error {
 	const errMessage = "could not add realm role to group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "realm"))
 
@@ -2102,7 +2123,7 @@ func (g *GoCloak) AddRealmRoleToGroup(ctx context.Context, token, realm, groupID
 func (g *GoCloak) DeleteRealmRoleFromGroup(ctx context.Context, token, realm, groupID string, roles []Role) error {
 	const errMessage = "could not delete realm role from group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "realm"))
 
@@ -2113,7 +2134,7 @@ func (g *GoCloak) DeleteRealmRoleFromGroup(ctx context.Context, token, realm, gr
 func (g *GoCloak) AddRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error {
 	const errMessage = "could not add realm role composite"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "roles", roleName, "composites"))
 
@@ -2124,7 +2145,7 @@ func (g *GoCloak) AddRealmRoleComposite(ctx context.Context, token, realm, roleN
 func (g *GoCloak) DeleteRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error {
 	const errMessage = "could not delete realm role composite"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "roles", roleName, "composites"))
 
@@ -2136,7 +2157,7 @@ func (g *GoCloak) GetCompositeRealmRoles(ctx context.Context, token, realm, role
 	const errMessage = "could not get composite realm roles by role"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles", roleName, "composites"))
 
@@ -2152,7 +2173,7 @@ func (g *GoCloak) GetCompositeRolesByRoleID(ctx context.Context, token, realm, r
 	const errMessage = "could not get composite client roles by role id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles-by-id", roleID, "composites"))
 
@@ -2168,7 +2189,7 @@ func (g *GoCloak) GetCompositeRealmRolesByRoleID(ctx context.Context, token, rea
 	const errMessage = "could not get composite client roles by role id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "roles-by-id", roleID, "composites", "realm"))
 
@@ -2184,7 +2205,7 @@ func (g *GoCloak) GetCompositeRealmRolesByUserID(ctx context.Context, token, rea
 	const errMessage = "could not get composite client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "realm", "composite"))
 
@@ -2200,7 +2221,7 @@ func (g *GoCloak) GetCompositeRealmRolesByGroupID(ctx context.Context, token, re
 	const errMessage = "could not get composite client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "realm", "composite"))
 
@@ -2216,7 +2237,7 @@ func (g *GoCloak) GetAvailableRealmRolesByUserID(ctx context.Context, token, rea
 	const errMessage = "could not get available client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "realm", "available"))
 
@@ -2232,7 +2253,7 @@ func (g *GoCloak) GetAvailableRealmRolesByGroupID(ctx context.Context, token, re
 	const errMessage = "could not get available client roles by user id"
 
 	var result []*Role
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "realm", "available"))
 
@@ -2252,7 +2273,7 @@ func (g *GoCloak) GetRealm(ctx context.Context, token, realm string) (*RealmRepr
 	const errMessage = "could not get realm"
 
 	var result RealmRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm))
 
@@ -2268,7 +2289,7 @@ func (g *GoCloak) GetRealms(ctx context.Context, token string) ([]*RealmRepresen
 	const errMessage = "could not get realms"
 
 	var result []*RealmRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(""))
 
@@ -2283,7 +2304,7 @@ func (g *GoCloak) GetRealms(ctx context.Context, token string) ([]*RealmRepresen
 func (g *GoCloak) CreateRealm(ctx context.Context, token string, realm RealmRepresentation) (string, error) {
 	const errMessage = "could not create realm"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(&realm).
 		Post(g.getAdminRealmURL(""))
 
@@ -2297,7 +2318,7 @@ func (g *GoCloak) CreateRealm(ctx context.Context, token string, realm RealmRepr
 func (g *GoCloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation) error {
 	const errMessage = "could not update realm"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(realm).
 		Put(g.getAdminRealmURL(PString(realm.Realm)))
 
@@ -2308,7 +2329,7 @@ func (g *GoCloak) UpdateRealm(ctx context.Context, token string, realm RealmRepr
 func (g *GoCloak) DeleteRealm(ctx context.Context, token, realm string) error {
 	const errMessage = "could not delete realm"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm))
 
 	return checkForError(resp, err, errMessage)
@@ -2318,7 +2339,7 @@ func (g *GoCloak) DeleteRealm(ctx context.Context, token, realm string) error {
 func (g *GoCloak) ClearRealmCache(ctx context.Context, token, realm string) error {
 	const errMessage = "could not clear realm cache"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Post(g.getAdminRealmURL(realm, "clear-realm-cache"))
 
 	return checkForError(resp, err, errMessage)
@@ -2328,7 +2349,7 @@ func (g *GoCloak) ClearRealmCache(ctx context.Context, token, realm string) erro
 func (g *GoCloak) ClearUserCache(ctx context.Context, token, realm string) error {
 	const errMessage = "could not clear user cache"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Post(g.getAdminRealmURL(realm, "clear-user-cache"))
 
 	return checkForError(resp, err, errMessage)
@@ -2338,7 +2359,7 @@ func (g *GoCloak) ClearUserCache(ctx context.Context, token, realm string) error
 func (g *GoCloak) ClearKeysCache(ctx context.Context, token, realm string) error {
 	const errMessage = "could not clear keys cache"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Post(g.getAdminRealmURL(realm, "clear-keys-cache"))
 
 	return checkForError(resp, err, errMessage)
@@ -2348,7 +2369,7 @@ func (g *GoCloak) ClearKeysCache(ctx context.Context, token, realm string) error
 func (g *GoCloak) GetAuthenticationFlows(ctx context.Context, token, realm string) ([]*AuthenticationFlowRepresentation, error) {
 	const errMessage = "could not retrieve authentication flows"
 	var result []*AuthenticationFlowRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "authentication", "flows"))
 
@@ -2358,21 +2379,49 @@ func (g *GoCloak) GetAuthenticationFlows(ctx context.Context, token, realm strin
 	return result, nil
 }
 
+// GetAuthenticationFlow get an authentication flow with the given ID
+func (g *GoCloak) GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (*AuthenticationFlowRepresentation, error) {
+	const errMessage = "could not retrieve authentication flows"
+	var result *AuthenticationFlowRepresentation
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
+		SetResult(&result).
+		Get(g.getAdminRealmURL(realm, "authentication", "flows", authenticationFlowID))
+
+	if err := checkForError(resp, err, errMessage); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
 // CreateAuthenticationFlow creates a new Authentication flow in a realm
 func (g *GoCloak) CreateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation) error {
 	const errMessage = "could not create authentication flows"
 	var result []*AuthenticationFlowRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).SetBody(flow).
 		Post(g.getAdminRealmURL(realm, "authentication", "flows"))
 
 	return checkForError(resp, err, errMessage)
 }
 
+// UpdateAuthenticationFlow a given Authentication Flow
+func (g *GoCloak) UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (*AuthenticationFlowRepresentation, error) {
+	const errMessage = "could not create authentication flows"
+	var result *AuthenticationFlowRepresentation
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
+		SetResult(&result).SetBody(flow).
+		Put(g.getAdminRealmURL(realm, "authentication", "flows", authenticationFlowID))
+
+	if err = checkForError(resp, err, errMessage); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
 // DeleteAuthenticationFlow deletes a flow in a realm with the given ID
 func (g *GoCloak) DeleteAuthenticationFlow(ctx context.Context, token, realm, flowID string) error {
 	const errMessage = "could not delete authentication flows"
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "authentication", "flows", flowID))
 
 	return checkForError(resp, err, errMessage)
@@ -2382,7 +2431,7 @@ func (g *GoCloak) DeleteAuthenticationFlow(ctx context.Context, token, realm, fl
 func (g *GoCloak) GetAuthenticationExecutions(ctx context.Context, token, realm, flow string) ([]*ModifyAuthenticationExecutionRepresentation, error) {
 	const errMessage = "could not retrieve authentication flows"
 	var result []*ModifyAuthenticationExecutionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "authentication", "flows", flow, "executions"))
 
@@ -2395,7 +2444,7 @@ func (g *GoCloak) GetAuthenticationExecutions(ctx context.Context, token, realm,
 // CreateAuthenticationExecution creates a new execution for the given flow name in the given realm
 func (g *GoCloak) CreateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution CreateAuthenticationExecutionRepresentation) error {
 	const errMessage = "could not create authentication execution"
-	resp, err := g.getRequestWithBearerAuth(ctx, token).SetBody(execution).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).SetBody(execution).
 		Post(g.getAdminRealmURL(realm, "authentication", "flows", flow, "executions", "execution"))
 
 	return checkForError(resp, err, errMessage)
@@ -2404,7 +2453,7 @@ func (g *GoCloak) CreateAuthenticationExecution(ctx context.Context, token, real
 // UpdateAuthenticationExecution updates an authentication execution for the given flow in the given realm
 func (g *GoCloak) UpdateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution ModifyAuthenticationExecutionRepresentation) error {
 	const errMessage = "could not update authentication execution"
-	resp, err := g.getRequestWithBearerAuth(ctx, token).SetBody(execution).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).SetBody(execution).
 		Put(g.getAdminRealmURL(realm, "authentication", "flows", flow, "executions"))
 
 	return checkForError(resp, err, errMessage)
@@ -2413,7 +2462,7 @@ func (g *GoCloak) UpdateAuthenticationExecution(ctx context.Context, token, real
 // DeleteAuthenticationExecution delete a single execution with the given ID
 func (g *GoCloak) DeleteAuthenticationExecution(ctx context.Context, token, realm, executionID string) error {
 	const errMessage = "could not delete authentication execution"
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "authentication", "executions", executionID))
 
 	return checkForError(resp, err, errMessage)
@@ -2422,7 +2471,7 @@ func (g *GoCloak) DeleteAuthenticationExecution(ctx context.Context, token, real
 // CreateAuthenticationExecutionFlow creates a new execution for the given flow name in the given realm
 func (g *GoCloak) CreateAuthenticationExecutionFlow(ctx context.Context, token, realm, flow string, executionFlow CreateAuthenticationExecutionFlowRepresentation) error {
 	const errMessage = "could not create authentication execution flow"
-	resp, err := g.getRequestWithBearerAuth(ctx, token).SetBody(executionFlow).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).SetBody(executionFlow).
 		Post(g.getAdminRealmURL(realm, "authentication", "flows", flow, "executions", "flow"))
 
 	return checkForError(resp, err, errMessage)
@@ -2438,7 +2487,7 @@ func (g *GoCloak) CreateAuthenticationExecutionFlow(ctx context.Context, token,
 func (g *GoCloak) CreateUser(ctx context.Context, token, realm string, user User) (string, error) {
 	const errMessage = "could not create user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(user).
 		Post(g.getAdminRealmURL(realm, "users"))
 
@@ -2453,7 +2502,7 @@ func (g *GoCloak) CreateUser(ctx context.Context, token, realm string, user User
 func (g *GoCloak) DeleteUser(ctx context.Context, token, realm, userID string) error {
 	const errMessage = "could not delete user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "users", userID))
 
 	return checkForError(resp, err, errMessage)
@@ -2468,7 +2517,7 @@ func (g *GoCloak) GetUserByID(ctx context.Context, accessToken, realm, userID st
 	}
 
 	var result User
-	resp, err := g.getRequestWithBearerAuth(ctx, accessToken).
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID))
 
@@ -2489,7 +2538,7 @@ func (g *GoCloak) GetUserCount(ctx context.Context, token string, realm string,
 		return 0, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "users", "count"))
@@ -2511,7 +2560,7 @@ func (g *GoCloak) GetUserGroups(ctx context.Context, token, realm, userID string
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "users", userID, "groups"))
@@ -2533,7 +2582,7 @@ func (g *GoCloak) GetUsers(ctx context.Context, token, realm string, params GetU
 		return nil, errors.Wrap(err, errMessage)
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "users"))
@@ -2546,12 +2595,18 @@ func (g *GoCloak) GetUsers(ctx context.Context, token, realm string, params GetU
 }
 
 // GetUsersByRoleName returns all users have a given role
-func (g *GoCloak) GetUsersByRoleName(ctx context.Context, token, realm, roleName string) ([]*User, error) {
+func (g *GoCloak) GetUsersByRoleName(ctx context.Context, token, realm, roleName string, params GetUsersByRoleParams) ([]*User, error) {
 	const errMessage = "could not get users by role name"
 
 	var result []*User
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	queryParams, err := GetQueryParams(params)
+	if err != nil {
+		return nil, errors.Wrap(err, errMessage)
+	}
+
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
+		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "roles", roleName, "users"))
 
 	if err := checkForError(resp, err, errMessage); err != nil {
@@ -2571,7 +2626,7 @@ func (g *GoCloak) GetUsersByClientRoleName(ctx context.Context, token, realm, id
 		return nil, err
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "roles", roleName, "users"))
@@ -2588,7 +2643,7 @@ func (g *GoCloak) SetPassword(ctx context.Context, token, userID, realm, passwor
 	const errMessage = "could not set password"
 
 	requestBody := SetPasswordRequest{Password: &password, Temporary: &temporary, Type: StringP("password")}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(requestBody).
 		Put(g.getAdminRealmURL(realm, "users", userID, "reset-password"))
 
@@ -2599,7 +2654,7 @@ func (g *GoCloak) SetPassword(ctx context.Context, token, userID, realm, passwor
 func (g *GoCloak) UpdateUser(ctx context.Context, token, realm string, user User) error {
 	const errMessage = "could not update user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(user).
 		Put(g.getAdminRealmURL(realm, "users", PString(user.ID)))
 
@@ -2610,7 +2665,7 @@ func (g *GoCloak) UpdateUser(ctx context.Context, token, realm string, user User
 func (g *GoCloak) AddUserToGroup(ctx context.Context, token, realm, userID, groupID string) error {
 	const errMessage = "could not add user to group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Put(g.getAdminRealmURL(realm, "users", userID, "groups", groupID))
 
 	return checkForError(resp, err, errMessage)
@@ -2620,7 +2675,7 @@ func (g *GoCloak) AddUserToGroup(ctx context.Context, token, realm, userID, grou
 func (g *GoCloak) DeleteUserFromGroup(ctx context.Context, token, realm, userID, groupID string) error {
 	const errMessage = "could not delete user from group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "groups", groupID))
 
 	return checkForError(resp, err, errMessage)
@@ -2631,7 +2686,7 @@ func (g *GoCloak) GetUserSessions(ctx context.Context, token, realm, userID stri
 	const errMessage = "could not get user sessions"
 
 	var res []*UserSessionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&res).
 		Get(g.getAdminRealmURL(realm, "users", userID, "sessions"))
 
@@ -2647,7 +2702,7 @@ func (g *GoCloak) GetUserOfflineSessionsForClient(ctx context.Context, token, re
 	const errMessage = "could not get user offline sessions for client"
 
 	var res []*UserSessionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&res).
 		Get(g.getAdminRealmURL(realm, "users", userID, "offline-sessions", idOfClient))
 
@@ -2662,7 +2717,7 @@ func (g *GoCloak) GetUserOfflineSessionsForClient(ctx context.Context, token, re
 func (g *GoCloak) AddClientRolesToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error {
 	const errMessage = "could not add client role to user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "clients", idOfClient))
 
@@ -2680,7 +2735,7 @@ func (g *GoCloak) AddClientRoleToUser(ctx context.Context, token, realm, idOfCli
 func (g *GoCloak) AddClientRolesToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error {
 	const errMessage = "could not add client role to group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "clients", idOfClient))
 
@@ -2698,7 +2753,7 @@ func (g *GoCloak) AddClientRoleToGroup(ctx context.Context, token, realm, idOfCl
 func (g *GoCloak) DeleteClientRolesFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error {
 	const errMessage = "could not delete client role from user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "role-mappings", "clients", idOfClient))
 
@@ -2716,7 +2771,7 @@ func (g *GoCloak) DeleteClientRoleFromUser(ctx context.Context, token, realm, id
 func (g *GoCloak) DeleteClientRoleFromGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error {
 	const errMessage = "could not client role from group"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "groups", groupID, "role-mappings", "clients", idOfClient))
 
@@ -2727,7 +2782,7 @@ func (g *GoCloak) DeleteClientRoleFromGroup(ctx context.Context, token, realm, i
 func (g *GoCloak) AddClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error {
 	const errMessage = "could not add client role composite"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "roles-by-id", roleID, "composites"))
 
@@ -2738,7 +2793,7 @@ func (g *GoCloak) AddClientRoleComposite(ctx context.Context, token, realm, role
 func (g *GoCloak) DeleteClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error {
 	const errMessage = "could not delete client role composite"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "roles-by-id", roleID, "composites"))
 
@@ -2750,7 +2805,7 @@ func (g *GoCloak) GetUserFederatedIdentities(ctx context.Context, token, realm,
 	const errMessage = "could not get user federated identities"
 
 	var res []*FederatedIdentityRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&res).
 		Get(g.getAdminRealmURL(realm, "users", userID, "federated-identity"))
 
@@ -2765,7 +2820,7 @@ func (g *GoCloak) GetUserFederatedIdentities(ctx context.Context, token, realm,
 func (g *GoCloak) CreateUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string, federatedIdentityRep FederatedIdentityRepresentation) error {
 	const errMessage = "could not create user federeated identity"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(federatedIdentityRep).
 		Post(g.getAdminRealmURL(realm, "users", userID, "federated-identity", providerID))
 
@@ -2776,12 +2831,28 @@ func (g *GoCloak) CreateUserFederatedIdentity(ctx context.Context, token, realm,
 func (g *GoCloak) DeleteUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string) error {
 	const errMessage = "could not delete user federeated identity"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "federated-identity", providerID))
 
 	return checkForError(resp, err, errMessage)
 }
 
+// GetUserBruteForceDetectionStatus fetches a user status regarding brute force protection
+func (g *GoCloak) GetUserBruteForceDetectionStatus(ctx context.Context, accessToken, realm, userID string) (*BruteForceStatus, error) {
+	const errMessage = "could not brute force detection Status"
+	var result BruteForceStatus
+
+	resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
+		SetResult(&result).
+		Get(g.getAttackDetectionURL(realm, "users", userID))
+
+	if err := checkForError(resp, err, errMessage); err != nil {
+		return nil, err
+	}
+
+	return &result, nil
+}
+
 // ------------------
 // Identity Providers
 // ------------------
@@ -2790,7 +2861,7 @@ func (g *GoCloak) DeleteUserFederatedIdentity(ctx context.Context, token, realm,
 func (g *GoCloak) CreateIdentityProvider(ctx context.Context, token string, realm string, providerRep IdentityProviderRepresentation) (string, error) {
 	const errMessage = "could not create identity provider"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(providerRep).
 		Post(g.getAdminRealmURL(realm, "identity-provider", "instances"))
 
@@ -2806,7 +2877,7 @@ func (g *GoCloak) GetIdentityProviders(ctx context.Context, token, realm string)
 	const errMessage = "could not get identity providers"
 
 	var result []*IdentityProviderRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances"))
 
@@ -2822,7 +2893,7 @@ func (g *GoCloak) GetIdentityProvider(ctx context.Context, token, realm, alias s
 	const errMessage = "could not get identity provider"
 
 	var result IdentityProviderRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances", alias))
 
@@ -2837,7 +2908,7 @@ func (g *GoCloak) GetIdentityProvider(ctx context.Context, token, realm, alias s
 func (g *GoCloak) UpdateIdentityProvider(ctx context.Context, token, realm, alias string, providerRep IdentityProviderRepresentation) error {
 	const errMessage = "could not update identity provider"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(providerRep).
 		Put(g.getAdminRealmURL(realm, "identity-provider", "instances", alias))
 
@@ -2848,7 +2919,7 @@ func (g *GoCloak) UpdateIdentityProvider(ctx context.Context, token, realm, alia
 func (g *GoCloak) DeleteIdentityProvider(ctx context.Context, token, realm, alias string) error {
 	const errMessage = "could not delete identity provider"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "identity-provider", "instances", alias))
 
 	return checkForError(resp, err, errMessage)
@@ -2858,7 +2929,7 @@ func (g *GoCloak) DeleteIdentityProvider(ctx context.Context, token, realm, alia
 func (g *GoCloak) ExportIDPPublicBrokerConfig(ctx context.Context, token, realm, alias string) (*string, error) {
 	const errMessage = "could not get public identity provider configuration"
 
-	resp, err := g.getRequestWithBearerAuthXMLHeader(ctx, token).
+	resp, err := g.GetRequestWithBearerAuthXMLHeader(ctx, token).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "export"))
 
 	if err := checkForError(resp, err, errMessage); err != nil {
@@ -2874,7 +2945,7 @@ func (g *GoCloak) ImportIdentityProviderConfig(ctx context.Context, token, realm
 	const errMessage = "could not import config"
 
 	result := make(map[string]string)
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(map[string]string{
 			"fromUrl":    fromURL,
@@ -2894,7 +2965,7 @@ func (g *GoCloak) ImportIdentityProviderConfigFromFile(ctx context.Context, toke
 	const errMessage = "could not import config"
 
 	result := make(map[string]string)
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetFileReader("file", fileName, fileBody).
 		SetFormData(map[string]string{
@@ -2913,7 +2984,7 @@ func (g *GoCloak) ImportIdentityProviderConfigFromFile(ctx context.Context, toke
 func (g *GoCloak) CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (string, error) {
 	const errMessage = "could not create mapper for identity provider"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(mapper).
 		Post(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers"))
 
@@ -2929,7 +3000,7 @@ func (g *GoCloak) GetIdentityProviderMapper(ctx context.Context, token string, r
 	const errMessage = "could not get identity provider mapper"
 
 	result := IdentityProviderMapper{}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers", mapperID))
 
@@ -2944,7 +3015,7 @@ func (g *GoCloak) GetIdentityProviderMapper(ctx context.Context, token string, r
 func (g *GoCloak) DeleteIdentityProviderMapper(ctx context.Context, token, realm, alias, mapperID string) error {
 	const errMessage = "could not delete mapper for identity provider"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers", mapperID))
 
 	return checkForError(resp, err, errMessage)
@@ -2955,7 +3026,7 @@ func (g *GoCloak) GetIdentityProviderMappers(ctx context.Context, token, realm,
 	const errMessage = "could not get identity provider mappers"
 
 	var result []*IdentityProviderMapper
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers"))
 
@@ -2971,7 +3042,7 @@ func (g *GoCloak) GetIdentityProviderMapperByID(ctx context.Context, token, real
 	const errMessage = "could not get identity provider mappers"
 
 	var result IdentityProviderMapper
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers", mapperID))
 
@@ -2986,7 +3057,7 @@ func (g *GoCloak) GetIdentityProviderMapperByID(ctx context.Context, token, real
 func (g *GoCloak) UpdateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) error {
 	const errMessage = "could not update identity provider mapper"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(mapper).
 		Put(g.getAdminRealmURL(realm, "identity-provider", "instances", alias, "mappers", PString(mapper.ID)))
 
@@ -3002,7 +3073,7 @@ func (g *GoCloak) GetResource(ctx context.Context, token, realm, idOfClient, res
 	const errMessage = "could not get resource"
 
 	var result ResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "resource", resourceID))
 
@@ -3018,7 +3089,7 @@ func (g *GoCloak) GetResourceClient(ctx context.Context, token, realm, resourceI
 	const errMessage = "could not get resource"
 
 	var result ResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, "authz", "protection", "resource_set", resourceID))
 
@@ -3041,7 +3112,7 @@ func (g *GoCloak) GetResources(ctx context.Context, token, realm, idOfClient str
 	}
 
 	var result []*ResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "resource"))
@@ -3064,7 +3135,7 @@ func (g *GoCloak) GetResourcesClient(ctx context.Context, token, realm string, p
 
 	var result []*ResourceRepresentation
 	var resourceIDs []string
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&resourceIDs).
 		SetQueryParams(queryParams).
 		Get(g.getRealmURL(realm, "authz", "protection", "resource_set"))
@@ -3091,7 +3162,7 @@ func (g *GoCloak) UpdateResource(ctx context.Context, token, realm, idOfClient s
 		return errors.New("ID of a resource required")
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(resource).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "resource", *(resource.ID)))
 
@@ -3106,7 +3177,7 @@ func (g *GoCloak) UpdateResourceClient(ctx context.Context, token, realm string,
 		return errors.New("ID of a resource required")
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(resource).
 		Put(g.getRealmURL(realm, "authz", "protection", "resource_set", *(resource.ID)))
 
@@ -3118,7 +3189,7 @@ func (g *GoCloak) CreateResource(ctx context.Context, token, realm string, idOfC
 	const errMessage = "could not create resource"
 
 	var result ResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(resource).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "resource"))
@@ -3135,7 +3206,7 @@ func (g *GoCloak) CreateResourceClient(ctx context.Context, token, realm string,
 	const errMessage = "could not create resource"
 
 	var result ResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(resource).
 		Post(g.getRealmURL(realm, "authz", "protection", "resource_set"))
@@ -3151,7 +3222,7 @@ func (g *GoCloak) CreateResourceClient(ctx context.Context, token, realm string,
 func (g *GoCloak) DeleteResource(ctx context.Context, token, realm, idOfClient, resourceID string) error {
 	const errMessage = "could not delete resource"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "resource", resourceID))
 
 	return checkForError(resp, err, errMessage)
@@ -3161,7 +3232,7 @@ func (g *GoCloak) DeleteResource(ctx context.Context, token, realm, idOfClient,
 func (g *GoCloak) DeleteResourceClient(ctx context.Context, token, realm, resourceID string) error {
 	const errMessage = "could not delete resource"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getRealmURL(realm, "authz", "protection", "resource_set", resourceID))
 
 	return checkForError(resp, err, errMessage)
@@ -3172,7 +3243,7 @@ func (g *GoCloak) GetScope(ctx context.Context, token, realm, idOfClient, scopeI
 	const errMessage = "could not get scope"
 
 	var result ScopeRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "scope", scopeID))
 
@@ -3192,7 +3263,7 @@ func (g *GoCloak) GetScopes(ctx context.Context, token, realm, idOfClient string
 		return nil, err
 	}
 	var result []*ScopeRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "scope"))
@@ -3209,7 +3280,7 @@ func (g *GoCloak) CreateScope(ctx context.Context, token, realm, idOfClient stri
 	const errMessage = "could not create scope"
 
 	var result ScopeRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(scope).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "scope"))
@@ -3229,7 +3300,7 @@ func (g *GoCloak) UpdateScope(ctx context.Context, token, realm, idOfClient stri
 		return errors.New("ID of a scope required")
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(scope).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "scope", *(scope.ID)))
 
@@ -3240,7 +3311,7 @@ func (g *GoCloak) UpdateScope(ctx context.Context, token, realm, idOfClient stri
 func (g *GoCloak) DeleteScope(ctx context.Context, token, realm, idOfClient, scopeID string) error {
 	const errMessage = "could not delete scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "scope", scopeID))
 
 	return checkForError(resp, err, errMessage)
@@ -3251,7 +3322,7 @@ func (g *GoCloak) GetPolicy(ctx context.Context, token, realm, idOfClient, polic
 	const errMessage = "could not get policy"
 
 	var result PolicyRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID))
 
@@ -3277,7 +3348,7 @@ func (g *GoCloak) GetPolicies(ctx context.Context, token, realm, idOfClient stri
 	}
 
 	var result []*PolicyRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, path...))
@@ -3298,7 +3369,7 @@ func (g *GoCloak) CreatePolicy(ctx context.Context, token, realm, idOfClient str
 	}
 
 	var result PolicyRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(policy).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", *(policy.Type)))
@@ -3318,7 +3389,7 @@ func (g *GoCloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient str
 		return errors.New("ID of a policy required")
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(policy).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", *(policy.Type), *(policy.ID)))
 
@@ -3329,7 +3400,7 @@ func (g *GoCloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient str
 func (g *GoCloak) DeletePolicy(ctx context.Context, token, realm, idOfClient, policyID string) error {
 	const errMessage = "could not delete policy"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID))
 
 	return checkForError(resp, err, errMessage)
@@ -3340,7 +3411,7 @@ func (g *GoCloak) GetAuthorizationPolicyAssociatedPolicies(ctx context.Context,
 	const errMessage = "could not get policy associated policies"
 
 	var result []*PolicyRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID, "associatedPolicies"))
 
@@ -3356,7 +3427,7 @@ func (g *GoCloak) GetAuthorizationPolicyResources(ctx context.Context, token, re
 	const errMessage = "could not get policy resources"
 
 	var result []*PolicyResourceRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID, "resources"))
 
@@ -3372,7 +3443,7 @@ func (g *GoCloak) GetAuthorizationPolicyScopes(ctx context.Context, token, realm
 	const errMessage = "could not get policy scopes"
 
 	var result []*PolicyScopeRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID, "scopes"))
 
@@ -3388,7 +3459,7 @@ func (g *GoCloak) GetResourcePolicy(ctx context.Context, token, realm, permissio
 	const errMessage = "could not get resource policy"
 
 	var result ResourcePolicyRepresentation
-	resp, err := g.getRequestWithBearerAuthNoCache(ctx, token).
+	resp, err := g.GetRequestWithBearerAuthNoCache(ctx, token).
 		SetResult(&result).
 		Get(g.getRealmURL(realm, "authz", "protection", "uma-policy", permissionID))
 
@@ -3409,7 +3480,7 @@ func (g *GoCloak) GetResourcePolicies(ctx context.Context, token, realm string,
 	}
 
 	var result []*ResourcePolicyRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getRealmURL(realm, "authz", "protection", "uma-policy"))
@@ -3426,7 +3497,7 @@ func (g *GoCloak) CreateResourcePolicy(ctx context.Context, token, realm, resour
 	const errMessage = "could not create resource policy"
 
 	var result ResourcePolicyRepresentation
-	resp, err := g.getRequestWithBearerAuthNoCache(ctx, token).
+	resp, err := g.GetRequestWithBearerAuthNoCache(ctx, token).
 		SetResult(&result).
 		SetBody(policy).
 		Post(g.getRealmURL(realm, "authz", "protection", "uma-policy", resourceID))
@@ -3442,7 +3513,7 @@ func (g *GoCloak) CreateResourcePolicy(ctx context.Context, token, realm, resour
 func (g *GoCloak) UpdateResourcePolicy(ctx context.Context, token, realm, permissionID string, policy ResourcePolicyRepresentation) error {
 	const errMessage = "could not update resource policy"
 
-	resp, err := g.getRequestWithBearerAuthNoCache(ctx, token).
+	resp, err := g.GetRequestWithBearerAuthNoCache(ctx, token).
 		SetBody(policy).
 		Put(g.getRealmURL(realm, "authz", "protection", "uma-policy", permissionID))
 
@@ -3453,7 +3524,7 @@ func (g *GoCloak) UpdateResourcePolicy(ctx context.Context, token, realm, permis
 func (g *GoCloak) DeleteResourcePolicy(ctx context.Context, token, realm, permissionID string) error {
 	const errMessage = "could not  delete resource policy"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getRealmURL(realm, "authz", "protection", "uma-policy", permissionID))
 
 	return checkForError(resp, err, errMessage)
@@ -3464,7 +3535,7 @@ func (g *GoCloak) GetPermission(ctx context.Context, token, realm, idOfClient, p
 	const errMessage = "could not get permission"
 
 	var result PermissionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", permissionID))
 
@@ -3480,7 +3551,7 @@ func (g *GoCloak) GetDependentPermissions(ctx context.Context, token, realm, idO
 	const errMessage = "could not get permission"
 
 	var result []*PermissionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "policy", policyID, "dependentPolicies"))
 
@@ -3496,7 +3567,7 @@ func (g *GoCloak) GetPermissionResources(ctx context.Context, token, realm, idOf
 	const errMessage = "could not get permission resource"
 
 	var result []*PermissionResource
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", permissionID, "resources"))
 
@@ -3512,7 +3583,7 @@ func (g *GoCloak) GetPermissionScopes(ctx context.Context, token, realm, idOfCli
 	const errMessage = "could not get permission scopes"
 
 	var result []*PermissionScope
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", permissionID, "scopes"))
 
@@ -3538,7 +3609,7 @@ func (g *GoCloak) GetPermissions(ctx context.Context, token, realm, idOfClient s
 	}
 
 	var result []*PermissionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, path...))
@@ -3579,7 +3650,7 @@ func (g *GoCloak) CreatePermissionTicket(ctx context.Context, token, realm strin
 	}
 
 	var result PermissionTicketResponseRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(permissions).
 		Post(g.getRealmURL(realm, "authz", "protection", "permission"))
@@ -3619,7 +3690,7 @@ func (g *GoCloak) GrantUserPermission(ctx context.Context, token, realm string,
 
 	var result PermissionGrantResponseRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(permission).
 		Post(g.getRealmURL(realm, "authz", "protection", "permission", "ticket"))
@@ -3655,7 +3726,7 @@ func (g *GoCloak) UpdateUserPermission(ctx context.Context, token, realm string,
 
 	var result PermissionGrantResponseRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(permission).
 		Put(g.getRealmURL(realm, "authz", "protection", "permission", "ticket"))
@@ -3681,7 +3752,7 @@ func (g *GoCloak) GetUserPermissions(ctx context.Context, token, realm string, p
 	}
 
 	var result []*PermissionGrantResponseRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getRealmURL(realm, "authz", "protection", "permission", "ticket"))
@@ -3697,7 +3768,7 @@ func (g *GoCloak) GetUserPermissions(ctx context.Context, token, realm string, p
 func (g *GoCloak) DeleteUserPermission(ctx context.Context, token, realm, ticketID string) error {
 	const errMessage = "could not delete user permission"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getRealmURL(realm, "authz", "protection", "permission", "ticket", ticketID))
 
 	return checkForError(resp, err, errMessage)
@@ -3712,7 +3783,7 @@ func (g *GoCloak) CreatePermission(ctx context.Context, token, realm, idOfClient
 	}
 
 	var result PermissionRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetBody(permission).
 		Post(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", *(permission.Type)))
@@ -3731,7 +3802,7 @@ func (g *GoCloak) UpdatePermission(ctx context.Context, token, realm, idOfClient
 	if NilOrEmpty(permission.ID) {
 		return errors.New("ID of a permission required")
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(permission).
 		Put(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", *permission.Type, *permission.ID))
 
@@ -3742,7 +3813,7 @@ func (g *GoCloak) UpdatePermission(ctx context.Context, token, realm, idOfClient
 func (g *GoCloak) DeletePermission(ctx context.Context, token, realm, idOfClient, permissionID string) error {
 	const errMessage = "could not delete permission"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "clients", idOfClient, "authz", "resource-server", "permission", permissionID))
 
 	return checkForError(resp, err, errMessage)
@@ -3757,7 +3828,7 @@ func (g *GoCloak) GetCredentialRegistrators(ctx context.Context, token, realm st
 	const errMessage = "could not get user credential registrators"
 
 	var result []string
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "credential-registrators"))
 
@@ -3773,7 +3844,7 @@ func (g *GoCloak) GetConfiguredUserStorageCredentialTypes(ctx context.Context, t
 	const errMessage = "could not get user credential registrators"
 
 	var result []string
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "configured-user-storage-credential-types"))
 
@@ -3789,7 +3860,7 @@ func (g *GoCloak) GetCredentials(ctx context.Context, token, realm, userID strin
 	const errMessage = "could not get user credentials"
 
 	var result []*CredentialRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "users", userID, "credentials"))
 
@@ -3804,7 +3875,7 @@ func (g *GoCloak) GetCredentials(ctx context.Context, token, realm, userID strin
 func (g *GoCloak) DeleteCredentials(ctx context.Context, token, realm, userID, credentialID string) error {
 	const errMessage = "could not delete user credentials"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "users", userID, "credentials", credentialID))
 
 	return checkForError(resp, err, errMessage)
@@ -3814,7 +3885,7 @@ func (g *GoCloak) DeleteCredentials(ctx context.Context, token, realm, userID, c
 func (g *GoCloak) UpdateCredentialUserLabel(ctx context.Context, token, realm, userID, credentialID, userLabel string) error {
 	const errMessage = "could not update credential label for a user"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetHeader("Content-Type", "text/plain").
 		SetBody(userLabel).
 		Put(g.getAdminRealmURL(realm, "users", userID, "credentials", credentialID, "userLabel"))
@@ -3826,7 +3897,7 @@ func (g *GoCloak) UpdateCredentialUserLabel(ctx context.Context, token, realm, u
 func (g *GoCloak) DisableAllCredentialsByType(ctx context.Context, token, realm, userID string, types []string) error {
 	const errMessage = "could not update disable credentials"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(types).
 		Put(g.getAdminRealmURL(realm, "users", userID, "disable-credential-types"))
 
@@ -3837,7 +3908,7 @@ func (g *GoCloak) DisableAllCredentialsByType(ctx context.Context, token, realm,
 func (g *GoCloak) MoveCredentialBehind(ctx context.Context, token, realm, userID, credentialID, newPreviousCredentialID string) error {
 	const errMessage = "could not move credential"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Post(g.getAdminRealmURL(realm, "users", userID, "credentials", credentialID, "moveAfter", newPreviousCredentialID))
 
 	return checkForError(resp, err, errMessage)
@@ -3847,7 +3918,7 @@ func (g *GoCloak) MoveCredentialBehind(ctx context.Context, token, realm, userID
 func (g *GoCloak) MoveCredentialToFirst(ctx context.Context, token, realm, userID, credentialID string) error {
 	const errMessage = "could not move credential"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Post(g.getAdminRealmURL(realm, "users", userID, "credentials", credentialID, "moveToFirst"))
 
 	return checkForError(resp, err, errMessage)
@@ -3863,7 +3934,7 @@ func (g *GoCloak) GetEvents(ctx context.Context, token string, realm string, par
 	}
 
 	var result []*EventRepresentation
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		SetQueryParams(queryParams).
 		Get(g.getAdminRealmURL(realm, "events"))
@@ -3881,7 +3952,7 @@ func (g *GoCloak) GetClientScopesScopeMappingsRealmRolesAvailable(ctx context.Co
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", clientScopeID, "scope-mappings", "realm", "available"))
 
@@ -3898,7 +3969,7 @@ func (g *GoCloak) GetClientScopesScopeMappingsRealmRoles(ctx context.Context, to
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", clientScopeID, "scope-mappings", "realm"))
 
@@ -3913,7 +3984,7 @@ func (g *GoCloak) GetClientScopesScopeMappingsRealmRoles(ctx context.Context, to
 func (g *GoCloak) DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error {
 	const errMessage = "could not delete realm-level roles from the client-scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "client-scopes", clientScopeID, "scope-mappings", "realm"))
 
@@ -3924,7 +3995,7 @@ func (g *GoCloak) DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context,
 func (g *GoCloak) CreateClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error {
 	const errMessage = "could not create realm-level roles to the client-scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "client-scopes", clientScopeID, "scope-mappings", "realm"))
 
@@ -3935,7 +4006,7 @@ func (g *GoCloak) CreateClientScopesScopeMappingsRealmRoles(ctx context.Context,
 func (g *GoCloak) RegisterRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) error {
 	const errMessage = "could not create required action"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(requiredAction).
 		Post(g.getAdminRealmURL(realm, "authentication", "register-required-action"))
 
@@ -3951,7 +4022,7 @@ func (g *GoCloak) GetRequiredActions(ctx context.Context, token string, realm st
 	const errMessage = "could not get required actions"
 	var result []*RequiredActionProviderRepresentation
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "authentication", "required-actions"))
 
@@ -3971,7 +4042,7 @@ func (g *GoCloak) GetRequiredAction(ctx context.Context, token string, realm str
 		return nil, errors.New("alias is required for getting a required action")
 	}
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "authentication", "required-actions", alias))
 
@@ -3989,7 +4060,7 @@ func (g *GoCloak) UpdateRequiredAction(ctx context.Context, token string, realm
 	if NilOrEmpty(requiredAction.ProviderID) {
 		return errors.New("providerId is required for updating a required action")
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(requiredAction).
 		Put(g.getAdminRealmURL(realm, "authentication", "required-actions", *requiredAction.ProviderID))
 
@@ -4003,7 +4074,7 @@ func (g *GoCloak) DeleteRequiredAction(ctx context.Context, token string, realm
 	if alias == "" {
 		return errors.New("alias is required for deleting a required action")
 	}
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		Delete(g.getAdminRealmURL(realm, "authentication", "required-actions", alias))
 
 	if err := checkForError(resp, err, errMessage); err != nil {
@@ -4019,7 +4090,7 @@ func (g *GoCloak) CreateClientScopesScopeMappingsClientRoles(
 ) error {
 	const errMessage = "could not create client-level roles to the client-scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Post(g.getAdminRealmURL(realm, "client-scopes", idOfClientScope, "scope-mappings", "clients", idOfClient))
 
@@ -4034,7 +4105,7 @@ func (g *GoCloak) GetClientScopesScopeMappingsClientRolesAvailable(ctx context.C
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", idOfClientScope, "scope-mappings", "clients", idOfClient, "available"))
 
@@ -4052,7 +4123,7 @@ func (g *GoCloak) GetClientScopesScopeMappingsClientRoles(ctx context.Context, t
 
 	var result []*Role
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetResult(&result).
 		Get(g.getAdminRealmURL(realm, "client-scopes", idOfClientScope, "scope-mappings", "clients", idOfClient))
 
@@ -4068,9 +4139,24 @@ func (g *GoCloak) GetClientScopesScopeMappingsClientRoles(ctx context.Context, t
 func (g *GoCloak) DeleteClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role) error {
 	const errMessage = "could not delete client-level roles from the client-scope"
 
-	resp, err := g.getRequestWithBearerAuth(ctx, token).
+	resp, err := g.GetRequestWithBearerAuth(ctx, token).
 		SetBody(roles).
 		Delete(g.getAdminRealmURL(realm, "client-scopes", idOfClientScope, "scope-mappings", "clients", idOfClient))
 
 	return checkForError(resp, err, errMessage)
 }
+
+// RevokeToken revokes the passed token. The token can either be an access or refresh token.
+func (g *GoCloak) RevokeToken(ctx context.Context, realm, clientID, clientSecret, refreshToken string) error {
+	const errMessage = "could not revoke token"
+
+	resp, err := g.GetRequestWithBasicAuth(ctx, clientID, clientSecret).
+		SetFormData(map[string]string{
+			"client_id":     clientID,
+			"client_secret": clientSecret,
+			"token":         refreshToken,
+		}).
+		Post(g.getRealmURL(realm, g.Config.revokeEndpoint))
+
+	return checkForError(resp, err, errMessage)
+}
diff --git a/docker-compose.yml b/docker-compose.yml
index 4f02c3e..b422ddb 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,8 +9,14 @@ services:
       KEYCLOAK_PASSWORD: secret
       KEYCLOAK_ADMIN: admin
       KEYCLOAK_ADMIN_PASSWORD: secret
+      KC_HEALTH_ENABLED: "true"
     ports:
       - "8080:8080"
+    healthcheck:
+      test: curl --fail --silent http://localhost:8080/health/ready 2>&1 || exit 1
+      interval: 10s
+      timeout: 10s
+      retries: 5
     volumes:
       -  ./testdata/gocloak-realm.json:/opt/keycloak/data/import/gocloak-realm.json
     entrypoint: ["/opt/keycloak/bin/kc.sh", "start-dev --features=preview --import-realm"]
diff --git a/examples/ADD_CLIENT_ROLE_TO_USER.md b/examples/ADD_CLIENT_ROLE_TO_USER.md
new file mode 100644
index 0000000..dfcb1eb
--- /dev/null
+++ b/examples/ADD_CLIENT_ROLE_TO_USER.md
@@ -0,0 +1,117 @@
+```go
+type Tkc struct {
+	realm  string
+	token  *gocloak.JWT
+	client *gocloak.GoCloak
+}
+
+func (tkc *Tkc) getClientRolesByList(ctx context.Context, idClient string, roles []string) (clientRoles []gocloak.Role, getErr error) {
+	var notFoundRoles []string
+
+	if roleObjects, tmpErr := tkc.client.GetClientRoles(ctx, tkc.token.AccessToken, tkc.realm, idClient, gocloak.GetRoleParams{}); tmpErr != nil {
+		getErr = fmt.Errorf("failed to get roles for client (error: %s)", tmpErr.Error())
+
+		return nil, getErr
+	} else {
+	searchRole:
+		for _, r := range roles {
+			for _, rb := range roleObjects {
+				if r == *rb.Name {
+					clientRoles = append(clientRoles, *rb)
+					continue searchRole
+				}
+			}
+			notFoundRoles = append(notFoundRoles, r)
+		}
+	}
+
+	if len(notFoundRoles) > 0 {
+		getErr = fmt.Errorf("failed to found role(s) '%s' for client", strings.Join(notFoundRoles, ", "))
+	}
+
+	return clientRoles, getErr
+}
+
+func (tkc *Tkc) getClients(ctx context.Context) (clients map[string]gocloak.Client, getErr error) {
+	var clientList []*gocloak.Client
+
+	// init map
+	clients = make(map[string]gocloak.Client)
+
+	// get all clients of realm
+	if clientList, getErr = tkc.client.GetClients(ctx, tkc.token.AccessToken, tkc.realm, gocloak.GetClientsParams{}); getErr != nil {
+		getErr = fmt.Errorf("get clients of realm failed (error: %s)", getErr.Error())
+		return clients, getErr
+	}
+
+	// transform to map with clientID as map key
+	for _, c := range clientList {
+		clients[*c.ClientID] = *c
+	}
+
+	return clients, nil
+}
+
+func (tkc *Tkc) addClientRolesToUser(idUser string, clientRoles map[string][]string) (addErr error) {
+
+	var clients map[string]gocloak.Client
+	var userMappedClientRoles *gocloak.MappingsRepresentation
+	var newRoles []string
+	var clientRolesToAdd []gocloak.Role
+	// ctx for current try
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+
+	// get mapped roles of user to check if some role mus be added
+	if userMappedClientRoles, addErr = tkc.client.GetRoleMappingByUserID(ctx, tkc.token.AccessToken, tkc.realm, idUser); addErr != nil {
+		cancel()
+	}
+
+	// get clients to check if needed clients already exist
+	if clients, addErr = tkc.getClients(ctx); addErr != nil {
+		cancel()
+	}
+
+	// loop through given client role combination
+	for client, roles := range clientRoles {
+		// check client exist
+		if _, exist := clients[client]; !exist {
+			addErr = fmt.Errorf("client '%s' does not exist", client)
+			break
+		}
+
+		// check if given role must be added
+		if mappedClientRoles, exist := userMappedClientRoles.ClientMappings[client]; exist {
+		SearchForMappedRoles:
+			for _, role := range roles {
+				for _, mappedClientRole := range *mappedClientRoles.Mappings {
+					if role == *mappedClientRole.Name {
+						// when role already mapped, continue with next role
+						continue SearchForMappedRoles
+					}
+				}
+				newRoles = append(newRoles, role)
+			}
+		} else {
+			newRoles = roles
+		}
+
+		// add new roles otherwise do nothing
+		if len(newRoles) > 0 {
+			// get roles of client which should be added
+			if clientRolesToAdd, addErr = tkc.getClientRolesByList(ctx, *clients[client].ID, roles); addErr != nil {
+				break
+			}
+
+			// add roles to user
+			if addErr = tkc.client.AddClientRolesToUser(ctx, tkc.token.AccessToken, tkc.realm, *clients[client].ID, idUser, clientRolesToAdd); addErr != nil {
+				break
+			}
+		}
+	}
+
+	// cancel ctx
+	cancel()
+
+	return nil
+}
+```
\ No newline at end of file
diff --git a/examples/USER_FEDERATION.md b/examples/USER_FEDERATION.md
new file mode 100644
index 0000000..68c0f7e
--- /dev/null
+++ b/examples/USER_FEDERATION.md
@@ -0,0 +1,155 @@
+```go
+type Tkc struct {
+	realm  string
+	token  *gocloak.JWT
+	client *gocloak.GoCloak
+}
+
+func (tkc *Tkc) getRealms(ctx context.Context) (realms map[string]gocloak.RealmRepresentation, getErr error) {
+	var realmList []*gocloak.RealmRepresentation
+
+	// init map
+	realms = make(map[string]gocloak.RealmRepresentation)
+
+	// get all realms
+	if realmList, getErr = tkc.client.GetRealms(ctx, tkc.token.AccessToken); getErr != nil {
+		getErr = fmt.Errorf("get realms failed (error: %s)", getErr.Error())
+		return realms, getErr
+	}
+
+	// transform to map with realmID (meaning realm name) as map key
+	for _, r := range realmList {
+		realms[*r.Realm] = *r
+	}
+
+	return realms, nil
+}
+
+func (tkc *Tkc) newUserFederation(ctx context.Context) (userFederation gocloak.Component, newErr error) {
+	var idRealm string
+
+	// get realm ID, is needed as ParentID in gocloak.Component
+	if realms, newErr := tkc.getRealms(ctx); newErr != nil {
+		return userFederation, newErr
+	} else {
+		idRealm = *realms[tkc.realm].ID
+	}
+
+	userFederationConfig := make(map[string][]string)
+
+	// keycloak self
+	userFederationConfig["enabled"] = []string{"true"}
+	userFederationConfig["priority"] = []string{"1"}
+	userFederationConfig["importUsers"] = []string{"true"}
+
+	// sync options
+	userFederationConfig["fullSyncPeriod"] = []string{"-1"}
+	userFederationConfig["changedSyncPeriod"] = []string{"300"}
+	userFederationConfig["batchSizeForSync"] = []string{"1000"}
+
+	// ldap connection
+	userFederationConfig["editMode"] = []string{"READ_ONLY"}
+	userFederationConfig["vendor"] = []string{"other"}
+	userFederationConfig["connectionUrl"] = []string{"ldap://ldap"}
+	userFederationConfig["bindDn"] = []string{"cn=XXX,dc=example,dc=com"}
+	userFederationConfig["bindCredential"] = []string{"YYYYYY"}
+	userFederationConfig["usersDn"] = []string{"ou=users,dc=example,dc=com"}
+	userFederationConfig["usernameLDAPAttribute"] = []string{"uid"}
+	userFederationConfig["uuidLDAPAttribute"] = []string{"entryUUID"}
+	userFederationConfig["authType"] = []string{"simple"}
+	userFederationConfig["userObjectClasses"] = []string{"person, uidObject"}
+	userFederationConfig["rdnLDAPAttribute"] = []string{"cn"}
+	userFederationConfig["searchScope"] = []string{"1"}
+	userFederationConfig["pagination"] = []string{"true"}
+
+	userFederation = gocloak.Component{
+		Name:            gocloak.StringP("ldap"),
+		ProviderID:      gocloak.StringP("ldap"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.UserStorageProvider"),
+		ParentID:        gocloak.StringP(idRealm),
+		ComponentConfig: &userFederationConfig,
+	}
+
+	return userFederation, nil
+}
+
+func (tkc *Tkc) RunCreateUserFederation() error {
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+
+	defer func() {
+		cancel()
+	}()
+
+	// user federation is a keycloak component with type 'org.keycloak.storage.UserStorageProvider'
+	var userFederation gocloak.Component
+
+	// get default new legacy user federation to create or update an existing one
+	if newUserFederation, runErr := tkc.newUserFederation(ctx); runErr != nil {
+		return runErr
+	} else {
+		userFederation = newUserFederation
+	}
+
+	// search parameter to get exactly legacy user federation which belongs to given realm (parent)
+	ldapGetParams := gocloak.GetComponentsParams{
+		Name:         userFederation.Name,
+		ProviderType: userFederation.ProviderType,
+		ParentID:     userFederation.ParentID,
+	}
+
+	if comps, getErr := tkc.client.GetComponentsWithParams(ctx, tkc.token.AccessToken, tkc.realm, ldapGetParams); getErr != nil {
+		return getErr
+	} else {
+		// means user federation not found for given realm
+		if len(comps) == 0 {
+			if idUserFederation, createErr := tkc.client.CreateComponent(ctx, tkc.token.AccessToken, tkc.realm, userFederation); createErr != nil {
+				return createErr
+			} else {
+				// do full sync after creating new one
+				if syncErr := tkc.syncUserFederation(ctx, idUserFederation, true); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' created (%s), but sync failed", *userFederation.Name, idUserFederation)
+					return syncErr
+				}
+			}
+		} else {
+			// set ID of user federation for update exactly existing user federation
+			userFederation.ID = comps[0].ID
+			if updateErr := tkc.client.UpdateComponent(ctx, tkc.token.AccessToken, tkc.baseConfig.Realm, userFederation); updateErr != nil {
+				return updateErr
+			} else {
+				// do change sync only after update exiting one
+				if syncErr := tkc.syncUserFederation(ctx, *userFederation.ID, false); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' updated (%s), but sync failed", *userFederation.Name, *userFederation.ID)
+					return syncErr
+				}
+			}
+		}
+	}
+
+	return nil
+}
+
+func (tkc *Tkc) syncUserFederation(ctx context.Context, idUserFederation string, fullSync bool) error {
+	var url string
+
+	url = tkc.baseConfig.Url + "/admin/realms/" + tkc.realm + "/user-storage/" + idUserFederation + "/sync"
+
+	if fullSync {
+		url += "?action=triggerFullSync"
+	} else {
+		url += "?action=triggerChangedUsersSync"
+	}
+
+	if response, postErr := tkc.client.RestyClient().NewRequest().SetAuthToken(tkc.token.AccessToken).Post(url); postErr != nil {
+		return postErr
+	} else {
+		if response.StatusCode() != 200 {
+			postErr = fmt.Errorf("got status code '%d' with response body '%s'", response.StatusCode(), response.String())
+			return postErr
+		} 
+	}
+
+	return nil
+}
+}
+```
diff --git a/examples/USER_FEDERATION_GROUP_LDAP_MAPPER.md b/examples/USER_FEDERATION_GROUP_LDAP_MAPPER.md
new file mode 100644
index 0000000..22fed4e
--- /dev/null
+++ b/examples/USER_FEDERATION_GROUP_LDAP_MAPPER.md
@@ -0,0 +1,207 @@
+```go
+type Tkc struct {
+	realm  string
+	token  *gocloak.JWT
+	client *gocloak.GoCloak
+}
+
+// get all ldap mapper for given user federation
+func (tk *Tkc) getLdapMapperOfUserFederation(ctx context.Context, idUserFederation string) (mappers map[string]gocloak.Component, getErr error) {
+	var mapperList []*gocloak.Component
+	mappers = make(map[string]gocloak.Component)
+
+	// get only typed components for given id
+	mapperGetParameter := gocloak.GetComponentsParams{
+		ProviderType: gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:     gocloak.StringP(idUserFederation),
+	}
+
+	if mapperList, getErr = tk.client.GetComponentsWithParams(ctx, tk.token.AccessToken, tk.realm, mapperGetParameter); getErr != nil {
+		return mappers, getErr
+	}
+
+	// transform to map with mapper name as map key
+	for _, mapper := range mapperList {
+		mappers[*mapper.Name] = *mapper
+	}
+
+	return mappers, nil
+}
+
+// create given group ldap mapper for given user federation
+func (tk *Tkc) createGroupMapper(ctx context.Context, idUserFederation string, group string) (createErr error) {
+	var existingMappers map[string]gocloak.Component
+	var mapper gocloak.Component
+	var idMapper string
+
+	if existingMappers, createErr = tk.getLdapMapperOfUserFederation(ctx, idUserFederation); createErr != nil {
+		return createErr
+	}
+
+	mapper = prepareGroupLdapMapper(group, idUserFederation)
+	if existingMapper, exists := existingMappers[group]; exists {
+		mapper.ID = existingMapper.ID
+		if createErr = tk.client.UpdateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+			return createErr
+		}
+		log.Infof("group ldap mapper '%s' updated (%s)", *mapper.Name, *mapper.ID)
+	} else {
+		if idMapper, createErr = tk.client.CreateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+			return createErr
+		}
+		log.Infof("group ldap mapper '%s' created (%s)", *mapper.Name, idMapper)
+	}
+
+	return nil
+}
+
+// prepare component object of type 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper' with config
+func prepareGroupLdapMapper(name, idUserFederation string) (mapper gocloak.Component) {
+	mapperConfig := make(map[string][]string)
+
+	mapperConfig["mode"] = []string{"LDAP_ONLY"}
+	mapperConfig["membership.attribute.type"] = []string{"DN"}
+	mapperConfig["user.roles.retrieve.strategy"] = []string{"LOAD_GROUPS_BY_MEMBER_ATTRIBUTE"}
+	mapperConfig["group.name.ldap.attribute"] = []string{"cn"}
+	mapperConfig["membership.ldap.attribute"] = []string{"member"}
+	mapperConfig["preserve.group.inheritance"] = []string{"true"}
+	mapperConfig["membership.user.ldap.attribute"] = []string{"uid"}
+	mapperConfig["ignore.missing.group"] = []string{"false"}
+	mapperConfig["memberof.ldap.attribute"] = []string{"memberOf"}
+	mapperConfig["groups.dn"] = []string{"ou=groups,dc=example,dc=com"}
+	mapperConfig["group.object.classes"] = []string{"groupOfNames"}
+	mapperConfig["drop.non.existing.groups.during.sync"] = []string{"false"}
+
+	mapper = gocloak.Component{
+		Name:            gocloak.StringP(name),
+		ProviderID:      gocloak.StringP("group-ldap-mapper"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:        gocloak.StringP(idUserFederation),
+		ComponentConfig: &mapperConfig,
+	}
+
+	return mapper
+}
+
+// From last example: But with Mappers
+func (tkc *Tkc) newUserFederation(ctx context.Context) (userFederation gocloak.Component, newErr error) {
+	var idRealm string
+
+	// get realm ID, is needed as ParentID in gocloak.Component
+	if realms, newErr := tkc.getRealms(ctx); newErr != nil {
+		return userFederation, newErr
+	} else {
+		idRealm = *realms[tkc.realm].ID
+	}
+
+	userFederationConfig := make(map[string][]string)
+
+	// keycloak self
+	userFederationConfig["enabled"] = []string{"true"}
+	userFederationConfig["priority"] = []string{"1"}
+
+	// sync options
+	userFederationConfig["fullSyncPeriod"] = []string{"-1"}
+	userFederationConfig["changedSyncPeriod"] = []string{"300"}
+	userFederationConfig["batchSizeForSync"] = []string{"1000"}
+	userFederationConfig["importUsers"] = []string{"true"}
+
+	// ldap connection
+	userFederationConfig["editMode"] = []string{"READ_ONLY"}
+	userFederationConfig["vendor"] = []string{"other"}
+	userFederationConfig["connectionUrl"] = []string{"ldap://ldap"}
+	userFederationConfig["bindDn"] = []string{"cn=XXX,dc=example,dc=com"}
+	userFederationConfig["bindCredential"] = []string{"YYYYYY"}
+	userFederationConfig["usersDn"] = []string{"ou=users,dc=example,dc=com"}
+	userFederationConfig["usernameLDAPAttribute"] = []string{"uid"}
+	userFederationConfig["uuidLDAPAttribute"] = []string{"entryUUID"}
+	userFederationConfig["authType"] = []string{"simple"}
+	userFederationConfig["userObjectClasses"] = []string{"person, uidObject"}
+	userFederationConfig["rdnLDAPAttribute"] = []string{"cn"}
+	userFederationConfig["searchScope"] = []string{"1"}
+	userFederationConfig["pagination"] = []string{"true"}
+
+	userFederation = gocloak.Component{
+		Name:            gocloak.StringP("ldap"),
+		ProviderID:      gocloak.StringP("ldap"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.UserStorageProvider"),
+		ParentID:        gocloak.StringP(idRealm),
+		ComponentConfig: &userFederationConfig,
+	}
+
+	return userFederation, nil
+}
+
+func (tkc *Tkc) RunCreateUserFederation() error {
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+
+	defer func() {
+		cancel()
+	}()
+
+	// user federation is a keycloak component with type 'org.keycloak.storage.UserStorageProvider'
+	var userFederation gocloak.Component
+
+	// ldap mappers for legacy user federation
+	userModelAttributeMappers := make(map[string]string)
+	userModelAttributeMappers["office"] = "physicalDeliveryOfficeName"
+	userModelAttributeMappers["department"] = "destinationIndicator"
+	userModelAttributeMappers["address"] = "postalAddress"
+	userModelAttributeMappers["telephone"] = "telephoneNumber"
+	userModelAttributeMappers["fax"] = "facsimileTelephoneNumber"
+	userModelAttributeMappers["title"] = "title"
+	userModelAttributeMappers["firstName"] = "cn"
+
+	// ldap group mapper name
+	groupMapper := "group"
+
+	// get default new legacy user federation to create or update an existing one
+	if newUserFederation, runErr := tkc.newUserFederation(ctx); runErr != nil {
+		return runErr
+	} else {
+		userFederation = newUserFederation
+	}
+
+	// search parameter to get exactly legacy user federation which belongs to given realm (parent)
+	ldapGetParams := gocloak.GetComponentsParams{
+		Name:         userFederation.Name,
+		ProviderType: userFederation.ProviderType,
+		ParentID:     userFederation.ParentID,
+	}
+
+	if comps, getErr := tkc.client.GetComponentsWithParams(ctx, tkc.token.AccessToken, tkc.realm, ldapGetParams); getErr != nil {
+		return getErr
+	} else {
+		// means user federation not found for given realm
+		if len(comps) == 0 {
+			if idUserFederation, createErr := tkc.client.CreateComponent(ctx, tkc.token.AccessToken, tkc.realm, userFederation); createErr != nil {
+				return createErr
+			} else {
+				// do create federation group ldap mappers
+				if createErr := tkc.createGroupMapper(ctx, idUserFederation, groupMapper); createErr != nil {
+					return createErr
+				}
+				// do full sync after creating new one
+				if syncErr := tkc.syncUserFederation(ctx, idUserFederation, true); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' created (%s), but sync failed", *userFederation.Name, idUserFederation)
+					return syncErr
+				}
+			}
+		} else {
+			// set ID of user federation for update exactly existing user federation
+			userFederation.ID = comps[0].ID
+			if updateErr := tkc.client.UpdateComponent(ctx, tkc.token.AccessToken, tkc.baseConfig.Realm, userFederation); updateErr != nil {
+				return updateErr
+			} else {
+				// do change sync only after update exiting one
+				if syncErr := tkc.syncUserFederation(ctx, *userFederation.ID, false); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' updated (%s), but sync failed", *userFederation.Name, *userFederation.ID)
+					return syncErr
+				}
+			}
+		}
+	}
+
+	return nil
+}
+```
\ No newline at end of file
diff --git a/examples/USER_FEDERATION_ROLE_LDAP_MAPPER.md b/examples/USER_FEDERATION_ROLE_LDAP_MAPPER.md
new file mode 100644
index 0000000..6c0edbc
--- /dev/null
+++ b/examples/USER_FEDERATION_ROLE_LDAP_MAPPER.md
@@ -0,0 +1,206 @@
+```go
+type Tkc struct {
+	realm  string
+	token  *gocloak.JWT
+	client *gocloak.GoCloak
+}
+
+// get all ldap mapper for given user federation
+func (tk *Tkc) getLdapMapperOfUserFederation(ctx context.Context, idUserFederation string) (mappers map[string]gocloak.Component, getErr error) {
+	var mapperList []*gocloak.Component
+	mappers = make(map[string]gocloak.Component)
+
+	// get only typed components for given id
+	mapperGetParameter := gocloak.GetComponentsParams{
+		ProviderType: gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:     gocloak.StringP(idUserFederation),
+	}
+
+	if mapperList, getErr = tk.client.GetComponentsWithParams(ctx, tk.token.AccessToken, tk.realm, mapperGetParameter); getErr != nil {
+		return mappers, getErr
+	}
+
+	// transform to map with mapper name as map key
+	for _, mapper := range mapperList {
+		mappers[*mapper.Name] = *mapper
+	}
+
+	return mappers, nil
+}
+
+// create given role ldap mapper for given user federation
+func (tk *Tkc) createRoleMapper(ctx context.Context, idUserFederation string, role string) (createErr error) {
+	var existingMappers map[string]gocloak.Component
+	var mapper gocloak.Component
+	var idMapper string
+
+	if existingMappers, createErr = tk.getLdapMapperOfUserFederation(ctx, idUserFederation); createErr != nil {
+		return createErr
+	}
+
+	mapper = prepareRoleLdapMapper(role, idUserFederation)
+	if existingMapper, exists := existingMappers[role]; exists {
+		mapper.ID = existingMapper.ID
+		if createErr = tk.client.UpdateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+			return createErr
+		}
+		log.Infof("role ldap mapper '%s' updated (%s)", *mapper.Name, *mapper.ID)
+	} else {
+		if idMapper, createErr = tk.client.CreateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+			return createErr
+		}
+		log.Infof("role ldap mapper '%s' created (%s)", *mapper.Name, idMapper)
+	}
+
+	return nil
+}
+
+// prepare component object of type 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper' with config
+func prepareRoleLdapMapper(name, idUserFederation string) (mapper gocloak.Component) {
+	mapperConfig := make(map[string][]string)
+
+	mapperConfig["roles.dn"] = []string{"ou=roles,dc=example,dc=com"}
+	mapperConfig["role.name.ldap.attribute"] = []string{"cn"}
+	mapperConfig["role.object.classes"] = []string{"group"}
+	mapperConfig["membership.ldap.attribute"] = []string{"member"}
+	mapperConfig["membership.attribute.type"] = []string{"DN"}
+	mapperConfig["membership.user.ldap.attribute"] = []string{"cn"}
+	mapperConfig["mode"] = []string{"IMPORT"}
+	mapperConfig["user.roles.retrieve.strategy"] = []string{"LOAD_ROLES_BY_MEMBER_ATTRIBUTE"}
+	mapperConfig["memberof.ldap.attribute"] = []string{"memberOf"}
+	mapperConfig["use.realm.roles.mapping"] = []string{"true"}
+	mapperConfig["client.id"] = []string{"account"}
+
+	mapper = gocloak.Component{
+		Name:            gocloak.StringP(name),
+		ProviderID:      gocloak.StringP("role-ldap-mapper"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:        gocloak.StringP(idUserFederation),
+		ComponentConfig: &mapperConfig,
+	}
+
+	return mapper
+}
+
+// From last example: But with Mappers
+func (tkc *Tkc) newUserFederation(ctx context.Context) (userFederation gocloak.Component, newErr error) {
+	var idRealm string
+
+	// get realm ID, is needed as ParentID in gocloak.Component
+	if realms, newErr := tkc.getRealms(ctx); newErr != nil {
+		return userFederation, newErr
+	} else {
+		idRealm = *realms[tkc.realm].ID
+	}
+
+	userFederationConfig := make(map[string][]string)
+
+	// keycloak self
+	userFederationConfig["enabled"] = []string{"true"}
+	userFederationConfig["priority"] = []string{"1"}
+
+	// sync options
+	userFederationConfig["fullSyncPeriod"] = []string{"-1"}
+	userFederationConfig["changedSyncPeriod"] = []string{"300"}
+	userFederationConfig["batchSizeForSync"] = []string{"1000"}
+	userFederationConfig["importUsers"] = []string{"true"}
+
+	// ldap connection
+	userFederationConfig["editMode"] = []string{"READ_ONLY"}
+	userFederationConfig["vendor"] = []string{"other"}
+	userFederationConfig["connectionUrl"] = []string{"ldap://ldap"}
+	userFederationConfig["bindDn"] = []string{"cn=XXX,dc=example,dc=com"}
+	userFederationConfig["bindCredential"] = []string{"YYYYYY"}
+	userFederationConfig["usersDn"] = []string{"ou=users,dc=example,dc=com"}
+	userFederationConfig["usernameLDAPAttribute"] = []string{"uid"}
+	userFederationConfig["uuidLDAPAttribute"] = []string{"entryUUID"}
+	userFederationConfig["authType"] = []string{"simple"}
+	userFederationConfig["userObjectClasses"] = []string{"person, uidObject"}
+	userFederationConfig["rdnLDAPAttribute"] = []string{"cn"}
+	userFederationConfig["searchScope"] = []string{"1"}
+	userFederationConfig["pagination"] = []string{"true"}
+
+	userFederation = gocloak.Component{
+		Name:            gocloak.StringP("ldap"),
+		ProviderID:      gocloak.StringP("ldap"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.UserStorageProvider"),
+		ParentID:        gocloak.StringP(idRealm),
+		ComponentConfig: &userFederationConfig,
+	}
+
+	return userFederation, nil
+}
+
+func (tkc *Tkc) RunCreateUserFederation() error {
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+
+	defer func() {
+		cancel()
+	}()
+
+	// user federation is a keycloak component with type 'org.keycloak.storage.UserStorageProvider'
+	var userFederation gocloak.Component
+
+	// ldap mappers for legacy user federation
+	userModelAttributeMappers := make(map[string]string)
+	userModelAttributeMappers["office"] = "physicalDeliveryOfficeName"
+	userModelAttributeMappers["department"] = "destinationIndicator"
+	userModelAttributeMappers["address"] = "postalAddress"
+	userModelAttributeMappers["telephone"] = "telephoneNumber"
+	userModelAttributeMappers["fax"] = "facsimileTelephoneNumber"
+	userModelAttributeMappers["title"] = "title"
+	userModelAttributeMappers["firstName"] = "cn"
+
+	// ldap role mapper name
+	roleMapper := "role"
+
+	// get default new legacy user federation to create or update an existing one
+	if newUserFederation, runErr := tkc.newUserFederation(ctx); runErr != nil {
+		return runErr
+	} else {
+		userFederation = newUserFederation
+	}
+
+	// search parameter to get exactly legacy user federation which belongs to given realm (parent)
+	ldapGetParams := gocloak.GetComponentsParams{
+		Name:         userFederation.Name,
+		ProviderType: userFederation.ProviderType,
+		ParentID:     userFederation.ParentID,
+	}
+
+	if comps, getErr := tkc.client.GetComponentsWithParams(ctx, tkc.token.AccessToken, tkc.realm, ldapGetParams); getErr != nil {
+		return getErr
+	} else {
+		// means user federation not found for given realm
+		if len(comps) == 0 {
+			if idUserFederation, createErr := tkc.client.CreateComponent(ctx, tkc.token.AccessToken, tkc.realm, userFederation); createErr != nil {
+				return createErr
+			} else {
+				// do create federation role ldap mappers
+				if createErr := tkc.createRoleMapper(ctx, idUserFederation, roleMapper); createErr != nil {
+					return createErr
+				}
+				// do full sync after creating new one
+				if syncErr := tkc.syncUserFederation(ctx, idUserFederation, true); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' created (%s), but sync failed", *userFederation.Name, idUserFederation)
+					return syncErr
+				}
+			}
+		} else {
+			// set ID of user federation for update exactly existing user federation
+			userFederation.ID = comps[0].ID
+			if updateErr := tkc.client.UpdateComponent(ctx, tkc.token.AccessToken, tkc.baseConfig.Realm, userFederation); updateErr != nil {
+				return updateErr
+			} else {
+				// do change sync only after update exiting one
+				if syncErr := tkc.syncUserFederation(ctx, *userFederation.ID, false); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' updated (%s), but sync failed", *userFederation.Name, *userFederation.ID)
+					return syncErr
+				}
+			}
+		}
+	}
+
+	return nil
+}
+```
\ No newline at end of file
diff --git a/examples/USER_FEDERATION_USER_ATTRIBUTE_LDAP_MAPPER.md b/examples/USER_FEDERATION_USER_ATTRIBUTE_LDAP_MAPPER.md
new file mode 100644
index 0000000..7ba5998
--- /dev/null
+++ b/examples/USER_FEDERATION_USER_ATTRIBUTE_LDAP_MAPPER.md
@@ -0,0 +1,200 @@
+```go
+type Tkc struct {
+	realm  string
+	token  *gocloak.JWT
+	client *gocloak.GoCloak
+}
+
+// get all ldap mapper for given user federation
+func (tk *Tkc) getLdapMapperOfUserFederation(ctx context.Context, idUserFederation string) (mappers map[string]gocloak.Component, getErr error) {
+	var mapperList []*gocloak.Component
+	mappers = make(map[string]gocloak.Component)
+
+	// get only typed components for given id
+	mapperGetParameter := gocloak.GetComponentsParams{
+		ProviderType: gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:     gocloak.StringP(idUserFederation),
+	}
+
+	if mapperList, getErr = tk.client.GetComponentsWithParams(ctx, tk.token.AccessToken, tk.realm, mapperGetParameter); getErr != nil {
+		return mappers, getErr
+	}
+
+	// transform to map with mapper name as map key
+	for _, mapper := range mapperList {
+		mappers[*mapper.Name] = *mapper
+	}
+
+	return mappers, nil
+}
+
+// create given user ldap attribute mappers for given user federation
+func (tk *Tkc) createUserModelAttributeMapper(ctx context.Context, idUserFederation string, mappers map[string]string) (createErr error) {
+	var existingMappers map[string]gocloak.Component
+	var mapper gocloak.Component
+	var idMapper string
+
+	if existingMappers, createErr = tk.getLdapMapperOfUserFederation(ctx, idUserFederation); createErr != nil {
+		return createErr
+	}
+
+	for userModelAttribute, ldapAttribute := range mappers {
+		mapper = prepareUserModelAttributeMapper(userModelAttribute, ldapAttribute, idUserFederation)
+		if existingMapper, exists := existingMappers[userModelAttribute]; exists {
+			mapper.ID = existingMapper.ID
+			if createErr = tk.client.UpdateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+				return createErr
+			}
+			log.Infof("user attribute ldap mapper '%s' updated (%s)", *mapper.Name, *mapper.ID)
+		} else {
+			if idMapper, createErr = tk.client.CreateComponent(ctx, tk.token.AccessToken, tk.realm, mapper); createErr != nil {
+				return createErr
+			}
+			log.Infof("user attribute ldap mapper '%s' created (%s)", *mapper.Name, idMapper)
+		}
+	}
+
+	return nil
+}
+
+
+// prepare component object of type 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper' and ProviderId 'user-attribute-ldap-mapper' with config
+func prepareUserModelAttributeMapper(userModelAttribute, ldapAttribute, idUserFederation string) (mapper gocloak.Component) {
+	mapperConfig := make(map[string][]string)
+
+	mapperConfig["ldap.attribute"] = []string{ldapAttribute}
+	mapperConfig["user.model.attribute"] = []string{userModelAttribute}
+	mapperConfig["is.mandatory.in.ldap"] = []string{"false"}
+	mapperConfig["always.read.value.from.ldap"] = []string{"false"}
+	mapperConfig["read.only"] = []string{"true"}
+
+	mapper = gocloak.Component{
+		Name:            gocloak.StringP(userModelAttribute),
+		ProviderID:      gocloak.StringP("user-attribute-ldap-mapper"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.ldap.mappers.LDAPStorageMapper"),
+		ParentID:        gocloak.StringP(idUserFederation),
+		ComponentConfig: &mapperConfig,
+	}
+
+	return mapper
+}
+
+// From last example: But with Mappers
+func (tkc *Tkc) newUserFederation(ctx context.Context) (userFederation gocloak.Component, newErr error) {
+	var idRealm string
+
+	// get realm ID, is needed as ParentID in gocloak.Component
+	if realms, newErr := tkc.getRealms(ctx); newErr != nil {
+		return userFederation, newErr
+	} else {
+		idRealm = *realms[tkc.realm].ID
+	}
+
+	userFederationConfig := make(map[string][]string)
+
+	// keycloak self
+	userFederationConfig["enabled"] = []string{"true"}
+	userFederationConfig["priority"] = []string{"1"}
+
+	// sync options
+	userFederationConfig["fullSyncPeriod"] = []string{"-1"}
+	userFederationConfig["changedSyncPeriod"] = []string{"300"}
+	userFederationConfig["batchSizeForSync"] = []string{"1000"}
+	userFederationConfig["importUsers"] = []string{"true"}
+
+	// ldap connection
+	userFederationConfig["editMode"] = []string{"READ_ONLY"}
+	userFederationConfig["vendor"] = []string{"other"}
+	userFederationConfig["connectionUrl"] = []string{"ldap://ldap"}
+	userFederationConfig["bindDn"] = []string{"cn=XXX,dc=example,dc=com"}
+	userFederationConfig["bindCredential"] = []string{"YYYYYY"}
+	userFederationConfig["usersDn"] = []string{"ou=users,dc=example,dc=com"}
+	userFederationConfig["usernameLDAPAttribute"] = []string{"uid"}
+	userFederationConfig["uuidLDAPAttribute"] = []string{"entryUUID"}
+	userFederationConfig["authType"] = []string{"simple"}
+	userFederationConfig["userObjectClasses"] = []string{"person, uidObject"}
+	userFederationConfig["rdnLDAPAttribute"] = []string{"cn"}
+	userFederationConfig["searchScope"] = []string{"1"}
+	userFederationConfig["pagination"] = []string{"true"}
+
+	userFederation = gocloak.Component{
+		Name:            gocloak.StringP("ldap"),
+		ProviderID:      gocloak.StringP("ldap"),
+		ProviderType:    gocloak.StringP("org.keycloak.storage.UserStorageProvider"),
+		ParentID:        gocloak.StringP(idRealm),
+		ComponentConfig: &userFederationConfig,
+	}
+
+	return userFederation, nil
+}
+
+func (tkc *Tkc) RunCreateUserFederation() error {
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+
+	defer func() {
+		cancel()
+	}()
+
+	// user federation is a keycloak component with type 'org.keycloak.storage.UserStorageProvider'
+	var userFederation gocloak.Component
+
+	// ldap mappers for legacy user federation
+	userModelAttributeMappers := make(map[string]string)
+	userModelAttributeMappers["office"] = "physicalDeliveryOfficeName"
+	userModelAttributeMappers["department"] = "destinationIndicator"
+	userModelAttributeMappers["address"] = "postalAddress"
+	userModelAttributeMappers["telephone"] = "telephoneNumber"
+	userModelAttributeMappers["fax"] = "facsimileTelephoneNumber"
+	userModelAttributeMappers["title"] = "title"
+	userModelAttributeMappers["firstName"] = "cn"
+
+	// get default new legacy user federation to create or update an existing one
+	if newUserFederation, runErr := tkc.newUserFederation(ctx); runErr != nil {
+		return runErr
+	} else {
+		userFederation = newUserFederation
+	}
+
+	// search parameter to get exactly legacy user federation which belongs to given realm (parent)
+	ldapGetParams := gocloak.GetComponentsParams{
+		Name:         userFederation.Name,
+		ProviderType: userFederation.ProviderType,
+		ParentID:     userFederation.ParentID,
+	}
+
+	if comps, getErr := tkc.client.GetComponentsWithParams(ctx, tkc.token.AccessToken, tkc.realm, ldapGetParams); getErr != nil {
+		return getErr
+	} else {
+		// means user federation not found for given realm
+		if len(comps) == 0 {
+			if idUserFederation, createErr := tkc.client.CreateComponent(ctx, tkc.token.AccessToken, tkc.realm, userFederation); createErr != nil {
+				return createErr
+			} else {
+				// do create federation user attribute ldap mappers
+				if createErr := tkc.createUserModelAttributeMapper(ctx, idUserFederation, userModelAttributeMappers); createErr != nil {
+					return createErr
+				}
+				// do full sync after creating new one
+				if syncErr := tkc.syncUserFederation(ctx, idUserFederation, true); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' created (%s), but sync failed", *userFederation.Name, idUserFederation)
+					return syncErr
+				}
+			}
+		} else {
+			// set ID of user federation for update exactly existing user federation
+			userFederation.ID = comps[0].ID
+			if updateErr := tkc.client.UpdateComponent(ctx, tkc.token.AccessToken, tkc.baseConfig.Realm, userFederation); updateErr != nil {
+				return updateErr
+			} else {
+				// do change sync only after update exiting one
+				if syncErr := tkc.syncUserFederation(ctx, *userFederation.ID, false); syncErr != nil {
+					syncErr = fmt.Errorf("legacy user federation '%s' updated (%s), but sync failed", *userFederation.Name, *userFederation.ID)
+					return syncErr
+				}
+			}
+		}
+	}
+
+	return nil
+}
+```
\ No newline at end of file
diff --git a/go.mod b/go.mod
index 3359f49..90f78f0 100644
--- a/go.mod
+++ b/go.mod
@@ -1,20 +1,20 @@
-module github.com/Nerzal/gocloak/v12
+module github.com/Nerzal/gocloak/v13
 
 go 1.18
 
 require (
 	github.com/go-resty/resty/v2 v2.7.0
-	github.com/golang-jwt/jwt/v4 v4.4.2
+	github.com/golang-jwt/jwt/v4 v4.5.0
 	github.com/opentracing/opentracing-go v1.2.0
 	github.com/pkg/errors v0.9.1
 	github.com/segmentio/ksuid v1.0.4
-	github.com/stretchr/testify v1.8.0
-	golang.org/x/crypto v0.0.0-20221012134737-56aed061732a
+	github.com/stretchr/testify v1.8.2
+	golang.org/x/crypto v0.6.0
 )
 
 require (
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
-	golang.org/x/net v0.0.0-20221019024206-cb67ada4b0ad // indirect
+	golang.org/x/net v0.7.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 0159047..a8aaf84 100644
--- a/go.sum
+++ b/go.sum
@@ -3,8 +3,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
 github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
-github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
-github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
+github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
 github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -15,15 +15,17 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c
 github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-golang.org/x/crypto v0.0.0-20221012134737-56aed061732a h1:NmSIgad6KjE6VvHciPZuNRTKxGhlPfD6OA87W/PLkqg=
-golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
+golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
 golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20221019024206-cb67ada4b0ad h1:Zx6wVVDwwNJFWXNIvDi7o952w3/1ckSwYk/7eykRmjM=
-golang.org/x/net v0.0.0-20221019024206-cb67ada4b0ad/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s=
+golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
+golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
diff --git a/models.go b/models.go
index 089efb3..2be8db1 100644
--- a/models.go
+++ b/models.go
@@ -342,11 +342,13 @@ type GroupsCount struct {
 
 // GetGroupsParams represents the optional parameters for getting groups
 type GetGroupsParams struct {
+	BriefRepresentation *bool   `json:"briefRepresentation,string,omitempty"`
+	Exact               *bool   `json:"exact,string,omitempty"`
 	First               *int    `json:"first,string,omitempty"`
+	Full                *bool   `json:"full,string,omitempty"`
 	Max                 *int    `json:"max,string,omitempty"`
+	Q                   *string `json:"q,omitempty"`
 	Search              *string `json:"search,omitempty"`
-	Full                *bool   `json:"full,string,omitempty"`
-	BriefRepresentation *bool   `json:"briefRepresentation,string,omitempty"`
 }
 
 // MarshalJSON is a custom json marshaling function to automatically set the Full and BriefRepresentation properties
@@ -478,7 +480,7 @@ type Client struct {
 	ProtocolMappers                    *[]ProtocolMapperRepresentation `json:"protocolMappers,omitempty"`
 	PublicClient                       *bool                           `json:"publicClient,omitempty"`
 	RedirectURIs                       *[]string                       `json:"redirectUris,omitempty"`
-	RegisteredNodes                    *map[string]string              `json:"registeredNodes,omitempty"`
+	RegisteredNodes                    *map[string]int                 `json:"registeredNodes,omitempty"`
 	RegistrationAccessToken            *string                         `json:"registrationAccessToken,omitempty"`
 	RootURL                            *string                         `json:"rootUrl,omitempty"`
 	Secret                             *string                         `json:"secret,omitempty"`
@@ -893,6 +895,29 @@ type MultiValuedHashMap struct {
 	Threshold  *int32   `json:"threshold,omitempty"`
 }
 
+// AuthorizationParameters represents the options to obtain get an authorization
+type AuthorizationParameters struct {
+	ResponseType *string `json:"code,omitempty"`
+	ClientID     *string `json:"client_id,omitempty"`
+	Scope        *string `json:"scope,omitempty"`
+	RedirectURI  *string `json:"redirect_uri,omitempty"`
+	State        *string `json:"state,omitempty"`
+	Nonce        *string `json:"nonce,omitempty"`
+	IDTokenHint  *string `json:"id_token_hint,omitempty"`
+}
+
+// FormData returns a map of options to be used in SetFormData function
+func (p *AuthorizationParameters) FormData() map[string]string {
+	m, _ := json.Marshal(p)
+	var res map[string]string
+	_ = json.Unmarshal(m, &res)
+	return res
+}
+
+// AuthorizationResponse represents the response to an authorization request.
+type AuthorizationResponse struct {
+}
+
 // TokenOptions represents the options to obtain a token
 type TokenOptions struct {
 	ClientID            *string   `json:"client_id,omitempty"`
@@ -1360,6 +1385,14 @@ type CredentialRepresentation struct {
 	UserLabel      *string `json:"userLabel,omitempty"`
 }
 
+// BruteForceStatus is a representation of realm user regarding brute force attack
+type BruteForceStatus struct {
+	NumFailures   *int    `json:"numFailures,omitempty"`
+	Disabled      *bool   `json:"disabled,omitempty"`
+	LastIPFailure *string `json:"lastIPFailure,omitempty"`
+	LastFailure   *int    `json:"lastFailure,omitempty"`
+}
+
 // RequiredActionProviderRepresentation is a representation of required actions
 // v15: https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_requiredactionproviderrepresentation
 type RequiredActionProviderRepresentation struct {
@@ -1464,3 +1497,4 @@ func (v *ResourcePolicyRepresentation) String() string              { return pre
 func (v *GetResourcePoliciesParams) String() string                 { return prettyStringStruct(v) }
 func (v *CredentialRepresentation) String() string                  { return prettyStringStruct(v) }
 func (v *RequiredActionProviderRepresentation) String() string      { return prettyStringStruct(v) }
+func (v *BruteForceStatus) String() string                          { return prettyStringStruct(v) }


Test patch:
diff --git a/client_benchmark_test.go b/client_benchmark_test.go
index cbd3eba..fca042d 100644
--- a/client_benchmark_test.go
+++ b/client_benchmark_test.go
@@ -4,7 +4,7 @@ import (
 	"context"
 	"testing"
 
-	"github.com/Nerzal/gocloak/v12"
+	"github.com/Nerzal/gocloak/v13"
 
 	"github.com/stretchr/testify/assert"
 )
@@ -46,3 +46,95 @@ func BenchmarkLoginParallel(b *testing.B) {
 		}
 	})
 }
+
+func BenchmarkGetGroups(b *testing.B) {
+	cfg := GetConfig(b)
+	client := gocloak.NewClient(cfg.HostName)
+	token := GetAdminToken(b, client)
+	b.ResetTimer()
+	for i := 0; i < b.N; i++ {
+		_, err := client.GetGroups(
+			context.Background(),
+			token.AccessToken,
+			cfg.GoCloak.Realm,
+			gocloak.GetGroupsParams{},
+		)
+		assert.NoError(b, err)
+	}
+}
+
+func BenchmarkGetGroupsFull(b *testing.B) {
+	cfg := GetConfig(b)
+	client := gocloak.NewClient(cfg.HostName)
+	token := GetAdminToken(b, client)
+	params := gocloak.GetGroupsParams{
+		Full: gocloak.BoolP(true),
+	}
+	b.ResetTimer()
+	for i := 0; i < b.N; i++ {
+		_, err := client.GetGroups(
+			context.Background(),
+			token.AccessToken,
+			cfg.GoCloak.Realm,
+			params,
+		)
+		assert.NoError(b, err)
+	}
+}
+
+func BenchmarkGetGroupsBrief(b *testing.B) {
+	cfg := GetConfig(b)
+	client := gocloak.NewClient(cfg.HostName)
+	params := gocloak.GetGroupsParams{
+		BriefRepresentation: gocloak.BoolP(true),
+	}
+	token := GetAdminToken(b, client)
+	b.ResetTimer()
+	for i := 0; i < b.N; i++ {
+		_, err := client.GetGroups(
+			context.Background(),
+			token.AccessToken,
+			cfg.GoCloak.Realm,
+			params,
+		)
+		assert.NoError(b, err)
+	}
+}
+
+func BenchmarkGetGroup(b *testing.B) {
+	cfg := GetConfig(b)
+	client := gocloak.NewClient(cfg.HostName)
+	teardown, groupID := CreateGroup(b, client)
+	defer teardown()
+	token := GetAdminToken(b, client)
+	b.ResetTimer()
+	for i := 0; i < b.N; i++ {
+		_, err := client.GetGroup(
+			context.Background(),
+			token.AccessToken,
+			cfg.GoCloak.Realm,
+			groupID,
+		)
+		assert.NoError(b, err)
+	}
+}
+
+func BenchmarkGetGroupByPath(b *testing.B) {
+	cfg := GetConfig(b)
+	client := gocloak.NewClient(cfg.HostName)
+	teardown, groupID := CreateGroup(b, client)
+	token := GetAdminToken(b, client)
+	group, err := client.GetGroup(context.Background(), token.AccessToken, cfg.GoCloak.Realm, groupID)
+	assert.NoError(b, err)
+	defer teardown()
+	b.ResetTimer()
+	for i := 0; i < b.N; i++ {
+		_, err := client.GetGroupByPath(
+			context.Background(),
+			token.AccessToken,
+			cfg.GoCloak.Realm,
+			*group.Path,
+		)
+		assert.NoError(b, err)
+	}
+}
diff --git a/client_test.go b/client_test.go
index 1312cd8..c43597c 100644
--- a/client_test.go
+++ b/client_test.go
@@ -26,7 +26,7 @@ import (
 	"github.com/stretchr/testify/require"
 	"golang.org/x/crypto/pkcs12"
 
-	"github.com/Nerzal/gocloak/v12"
+	"github.com/Nerzal/gocloak/v13"
 )
 
 type configAdmin struct {
@@ -163,7 +163,7 @@ func GetClientByClientID(t *testing.T, client *gocloak.GoCloak, clientID string)
 	return nil
 }
 
-func CreateGroup(t *testing.T, client *gocloak.GoCloak) (func(), string) {
+func CreateGroup(t testing.TB, client *gocloak.GoCloak) (func(), string) {
 	cfg := GetConfig(t)
 	token := GetAdminToken(t, client)
 	group := gocloak.Group{
@@ -179,7 +179,9 @@ func CreateGroup(t *testing.T, client *gocloak.GoCloak) (func(), string) {
 		cfg.GoCloak.Realm,
 		group)
 	require.NoError(t, err, "CreateGroup failed")
-	t.Logf("Created Group ID: %s ", groupID)
+	if _, isBenchmark := t.(*testing.B); !isBenchmark {
+		t.Logf("Created Group ID: %s ", groupID)
+	}
 
 	tearDown := func() {
 		err := client.DeleteGroup(
@@ -3055,6 +3057,87 @@ func Test_CreateUser(t *testing.T) {
 	defer tearDown()
 }
 
+func Test_GetUserBruteForceDetectionStatus(t *testing.T) {
+	cfg := GetConfig(t)
+	client := NewClientWithDebug(t)
+	token := GetAdminToken(t, client)
+	realm, err := client.GetRealm(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm)
+	require.NoError(t, err, "GetRealm failed")
+
+	updatedRealm := realm
+	updatedRealm.BruteForceProtected = gocloak.BoolP(true)
+	updatedRealm.FailureFactor = gocloak.IntP(1)
+	updatedRealm.MaxFailureWaitSeconds = gocloak.IntP(2)
+	err = client.UpdateRealm(
+		context.Background(),
+		token.AccessToken,
+		*updatedRealm)
+	require.NoError(t, err, "UpdateRealm failed")
+
+	tearDownUser, userID := CreateUser(t, client)
+	defer tearDownUser()
+	err = client.SetPassword(
+		context.Background(),
+		token.AccessToken,
+		userID,
+		*realm.ID,
+		cfg.GoCloak.Password,
+		false)
+	require.NoError(t, err, "CreateUser failed")
+
+	fetchedUser, err := client.GetUserByID(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		userID)
+	require.NoError(t, err, "GetUserById failed")
+
+	_, err = client.Login(context.Background(),
+		cfg.GoCloak.ClientID,
+		cfg.GoCloak.ClientSecret,
+		*realm.ID,
+		*fetchedUser.Username,
+		"wrong password")
+	require.Error(t, err, "401 Unauthorized: invalid_grant: Invalid user credentials")
+	bruteForceStatus, err := client.GetUserBruteForceDetectionStatus(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		userID)
+	require.NoError(t, err, "Getting attack log failed")
+	require.Equal(t, 1, *bruteForceStatus.NumFailures, "Should return one failure")
+	require.Equal(t, true, *bruteForceStatus.Disabled, "The user shouldn be locked")
+
+	time.Sleep(2 * time.Second)
+	_, err = client.Login(
+		context.Background(),
+		cfg.GoCloak.ClientID,
+		cfg.GoCloak.ClientSecret,
+		*realm.ID,
+		*fetchedUser.Username,
+		cfg.GoCloak.Password)
+	require.NoError(t, err, "Login failed")
+
+	bruteForceStatus, err = client.GetUserBruteForceDetectionStatus(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		userID)
+	require.NoError(t, err, "Getting attack status failed")
+	require.Equal(t, 0, *bruteForceStatus.NumFailures, "Should return zero failures")
+	require.Equal(t, false, *bruteForceStatus.Disabled, "The user shouldn't be locked")
+
+	err = client.UpdateRealm(
+		context.Background(),
+		token.AccessToken,
+		*realm)
+	require.NoError(t, err, "UpdateRealm failed")
+
+}
+
 func Test_CreateUserCustomAttributes(t *testing.T) {
 	t.Parallel()
 	cfg := GetConfig(t)
@@ -3369,10 +3452,20 @@ func Test_GetUsersByRoleName(t *testing.T) {
 		context.Background(),
 		token.AccessToken,
 		cfg.GoCloak.Realm,
-		roleName)
+		roleName,
+		gocloak.GetUsersByRoleParams{})
 	require.NoError(t, err)
 	require.NotEmpty(t, users)
 	require.Equal(t, userID, *users[0].ID)
+
+	users, err = client.GetUsersByRoleName(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		"unknown role",
+		gocloak.GetUsersByRoleParams{})
+	require.Error(t, err, "GetUsersByRoleName no error on unknown role")
+	require.Empty(t, users)
 }
 
 func Test_GetUsersByClientRoleName(t *testing.T) {
@@ -6443,6 +6536,7 @@ func TestGocloak_CreateAuthenticationFlowsAndCreateAuthenticationExecutionAndFlo
 		Description: gocloak.StringP("my test description"),
 		TopLevel:    gocloak.BoolP(true),
 		ProviderID:  gocloak.StringP("basic-flow"),
+		ID:          gocloak.StringP("testauthflow2id"),
 	}
 
 	authExecFlow := gocloak.CreateAuthenticationExecutionFlowRepresentation{
@@ -6541,23 +6635,34 @@ func TestGocloak_CreateAuthenticationFlowsAndCreateAuthenticationExecutionAndFlo
 	require.True(t, execDeleted, "Failed to delete authentication execution, no execution was deleted")
 	require.True(t, execFlowFound, "Failed to find authentication execution flow")
 
-	flows, err := client.GetAuthenticationFlows(context.Background(), token.AccessToken, cfg.GoCloak.Realm)
-	require.NoError(t, err, "Failed to get authentication flows")
-	deleted := false
-	for _, flow := range flows {
-		if flow.Alias != nil && *flow.Alias == "testauthflow2" {
-			err = client.DeleteAuthenticationFlow(
-				context.Background(),
-				token.AccessToken,
-				cfg.GoCloak.Realm,
-				*flow.ID,
-			)
-			require.NoError(t, err, "Failed to delete authentication flow")
-			deleted = true
-			break
-		}
-	}
-	require.True(t, deleted, "Failed to delete authentication flow, no flow was deleted")
+	authFlow.Description = gocloak.StringP("my-new-description")
+	_, err = client.UpdateAuthenticationFlow(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		authFlow,
+		*authFlow.ID,
+	)
+
+	require.NoError(t, err, "Failed to update authentication flow")
+	t.Logf("updated authentication flow: %+v", authFlow)
+
+	retrievedAuthFlow, err := client.GetAuthenticationFlow(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		*authFlow.ID,
+	)
+	require.NoError(t, err, "Failed to fetch authentication flow")
+	t.Logf("retrieved authentication flow: %+v", retrievedAuthFlow)
+	require.Equal(t, "my-new-description", gocloak.PString(retrievedAuthFlow.Description))
+	err = client.DeleteAuthenticationFlow(
+		context.Background(),
+		token.AccessToken,
+		cfg.GoCloak.Realm,
+		*retrievedAuthFlow.ID,
+	)
+	require.NoError(t, err, "Failed to delete authentication flow")
 }
 
 func TestGocloak_CreateAndGetRequiredAction(t *testing.T) {
@@ -6749,3 +6854,19 @@ func Test_UpdateComponent(t *testing.T) {
 		)
 	}
 }
+
+func Test_RevokeToken(t *testing.T) {
+	t.Parallel()
+	cfg := GetConfig(t)
+	client := NewClientWithDebug(t)
+	SetUpTestUser(t, client)
+	token := GetUserToken(t, client)
+	err := client.RevokeToken(
+		context.Background(),
+		cfg.GoCloak.Realm,
+		cfg.GoCloak.ClientID,
+		cfg.GoCloak.ClientSecret,
+		token.RefreshToken,
+	)
+	require.NoError(t, err, "Revoke failed")
+}
diff --git a/model_test.go b/model_test.go
index ce342ba..ad069f2 100644
--- a/model_test.go
+++ b/model_test.go
@@ -5,7 +5,7 @@ import (
 	"errors"
 	"testing"
 
-	"github.com/Nerzal/gocloak/v12"
+	"github.com/Nerzal/gocloak/v13"
 
 	"github.com/stretchr/testify/assert"
 )
diff --git a/utils_test.go b/utils_test.go
index 0e2d5c7..ec3af23 100644
--- a/utils_test.go
+++ b/utils_test.go
@@ -5,7 +5,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/Nerzal/gocloak/v12"
+	"github.com/Nerzal/gocloak/v13"
 )
 
 func TestStringP(t *testing.T) {