@@ -32,13 +32,13 @@ For release notes please consult the specific releases [here](https://github.com
32
32
### Installation
33
33
34
34
``` shell
35
- go get github.com/Nerzal/gocloak/v11
35
+ go get github.com/Nerzal/gocloak/v13
36
36
```
37
37
38
38
### Importing
39
39
40
40
``` go
41
- import " github.com/Nerzal/gocloak/v11 "
41
+ import " github.com/Nerzal/gocloak/v13 "
42
42
```
43
43
44
44
### Create New User
@@ -80,7 +80,7 @@ go get github.com/Nerzal/gocloak/v11
80
80
panic (" Inspection failed:" + err.Error ())
81
81
}
82
82
83
- if !rptResult.Active {
83
+ if !* rptResult.Active {
84
84
panic (" Token is not active" )
85
85
}
86
86
@@ -160,6 +160,7 @@ type GoCloak interface {
160
160
CreateClientScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfClient string , roles []Role ) error
161
161
CreateClientScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClient, idOfSelectedClient string , roles []Role ) error
162
162
CreateClientScopesScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfCLientScope string , roles []Role ) error
163
+ CreateClientScopesScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClientScope, idOfClient string , roles []Role ) error
163
164
164
165
UpdateUser (ctx context.Context , accessToken, realm string , user User ) error
165
166
UpdateGroup (ctx context.Context , accessToken, realm string , updatedGroup Group ) error
@@ -177,6 +178,7 @@ type GoCloak interface {
177
178
DeleteClientScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfClient string , roles []Role ) error
178
179
DeleteClientScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClient, idOfSelectedClient string , roles []Role ) error
179
180
DeleteClientScopesScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfCLientScope string , roles []Role ) error
181
+ DeleteClientScopesScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClientScope, ifOfClient string , roles []Role ) error
180
182
181
183
GetClient (ctx context.Context , accessToken, realm, idOfClient string ) (*Client, error )
182
184
GetClientsDefaultScopes (ctx context.Context , token, realm, idOfClient string ) ([]*ClientScope, error )
@@ -193,8 +195,10 @@ type GoCloak interface {
193
195
GetClientScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfClient string ) ([]*Role, error )
194
196
GetClientScopeMappingsRealmRolesAvailable (ctx context.Context , token, realm, idOfClient string ) ([]*Role, error )
195
197
GetClientScopesScopeMappingsRealmRolesAvailable (ctx context.Context , token, realm, idOfClientScope string ) ([]*Role, error )
198
+ GetClientScopesScopeMappingsClientRolesAvailable (ctx context.Context , token, realm, idOfClientScope, idOfClient string ) ([]*Role, error )
196
199
GetClientScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClient, idOfSelectedClient string ) ([]*Role, error )
197
200
GetClientScopesScopeMappingsRealmRoles (ctx context.Context , token, realm, idOfClientScope string ) ([]*Role, error )
201
+ GetClientScopesScopeMappingsClientRoles (ctx context.Context , token, realm, idOfClientScope, idOfClient string ) ([]*Role, error )
198
202
GetClientScopeMappingsClientRolesAvailable (ctx context.Context , token, realm, idOfClient, idOfSelectedClient string ) ([]*Role, error )
199
203
GetClientSecret (ctx context.Context , token, realm, idOfClient string ) (*CredentialRepresentation, error )
200
204
GetClientServiceAccount (ctx context.Context , token, realm, idOfClient string ) (*User, error )
@@ -338,7 +342,14 @@ type GoCloak interface {
338
342
MoveCredentialBehind (ctx context.Context , token, realm, userID, credentialID, newPreviousCredentialID string ) error
339
343
MoveCredentialToFirst (ctx context.Context , token, realm, userID, credentialID string ) error
340
344
341
- // *** Identity Providers ***
345
+ // *** Authentication Flows ***
346
+ GetAuthenticationFlows (ctx context.Context , token, realm string ) ([]*AuthenticationFlowRepresentation, error )
347
+ GetAuthenticationFlow (ctx context.Context , token, realm string , authenticationFlowID string ) (*AuthenticationFlowRepresentation, error )
348
+ CreateAuthenticationFlow (ctx context.Context , token, realm string , flow AuthenticationFlowRepresentation ) error
349
+ UpdateAuthenticationFlow (ctx context.Context , token, realm string , flow AuthenticationFlowRepresentation , authenticationFlowID string ) (*AuthenticationFlowRepresentation, error )
350
+ DeleteAuthenticationFlow (ctx context.Context , token, realm, flowID string ) error
351
+
352
+ // *** Identity Providers ***
342
353
343
354
CreateIdentityProvider (ctx context.Context , token, realm string , providerRep IdentityProviderRepresentation ) (string , error )
344
355
GetIdentityProvider (ctx context.Context , token, realm, alias string ) (*IdentityProviderRepresentation, error )
@@ -464,6 +475,18 @@ yields
464
475
465
476
Note that empty parameters are not included, because of the use of ``` omitempty ``` in the type definitions.
466
477
478
+ ## Examples
479
+
480
+ * [ Add client role to user] ( ./examples/ADD_CLIENT_ROLE_TO_USER.md )
481
+
482
+ * [ Create User Federation & Sync] ( ./examples/USER_FEDERATION.md )
483
+
484
+ * [ Create User Federation & Sync with group ldap mapper] ( ./examples/USER_FEDERATION_GROUP_LDAP_MAPPER.md )
485
+
486
+ * [ Create User Federation & Sync with role ldap mapper] ( ./examples/USER_FEDERATION_ROLE_LDAP_MAPPER.md )
487
+
488
+ * [ Create User Federation & Sync with user attribute ldap mapper] ( ./examples/USER_FEDERATION_USER_ATTRIBUTE_LDAP_MAPPER.md )
489
+
467
490
## License
468
491
469
492
[ ![ 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 )
0 commit comments