Documentation
¶
Index ¶
Constants ¶
View Source
const ( GRANT_CLIENT_CREDENTIALS = "client_credentials" GRANT_PASSWORD = "password" REALM_MANAGEMENT_CLIENT = "realm-management" ERROR_401_UNATHORIZED = "401 Unauthorized: HTTP 401 Unauthorized" ERROR_CLIENT_SECRET_NOT_PROVIDED = "Client secret not provided in request" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IKeycloak ¶
type IKeycloak interface {
//
IsDebug() bool
Login(username string, password string) (*gocloak.JWT, error)
GetToken(tokenOptions gocloak.TokenOptions) (*gocloak.JWT, error)
RefreshToken(refreshToken string) (*gocloak.JWT, error)
Logout(refreshToken string) error
GetUserEmail(email string) (*gocloak.User, error)
CreateUser(user gocloak.User) (string, error)
UpdateUser(firstName string, lastName string, username string, attributes map[string][]string, realmRoles []string) (bool, error)
SetPassword(userID, realm, password string, temporary bool) error
LogoutUserSession(session string) error
CreateGroup(group gocloak.Group) (string, error)
// *** Client Roles ***
AddClientRoleToUser(idOfClient, userID string, roles []gocloak.Role) error
// *** Realm ***
GetRealm(realm string) (*gocloak.RealmRepresentation, error)
GetRealms() ([]*gocloak.RealmRepresentation, error)
CreateRealm(realm gocloak.RealmRepresentation) (string, error)
UpdateRealm(realm gocloak.RealmRepresentation) error
DeleteRealm(realm string) error
}
Click to show internal directories.
Click to hide internal directories.