Documentation ¶
Index ¶
- Constants
- type Config
- type IKeycloak
- type Keycloak
- func (k *Keycloak) CreateRealm(organizationId string) (string, error)
- func (k *Keycloak) CreateUser(organizationId string, user *gocloak.User) error
- func (k *Keycloak) DeleteRealm(organizationId string) error
- func (k *Keycloak) DeleteUser(organizationId string, userAccountId string) error
- func (k *Keycloak) GetRealm(organizationId string) (*domain.Organization, error)
- func (k *Keycloak) GetRealms() ([]*domain.Organization, error)
- func (k *Keycloak) GetSessions(userId string, organizationId string) (*[]string, error)
- func (k *Keycloak) GetUser(organizationId string, accountId string) (*gocloak.User, error)
- func (k *Keycloak) GetUsers(organizationId string) ([]*gocloak.User, error)
- func (k *Keycloak) InitializeKeycloak() error
- func (k *Keycloak) JoinGroup(organizationId string, userId string, groupName string) error
- func (k *Keycloak) LeaveGroup(organizationId string, userId string, groupName string) error
- func (k *Keycloak) Login(accountId string, password string, organizationId string) (*domain.User, error)
- func (k *Keycloak) LoginAdmin(accountId string, password string) (*domain.User, error)
- func (k *Keycloak) Logout(sessionId string, organizationId string) error
- func (k *Keycloak) UpdateRealm(organizationId string, organizationConfig domain.Organization) error
- func (k *Keycloak) UpdateUser(organizationId string, user *gocloak.User) error
- func (k *Keycloak) VerifyAccessToken(token string, organizationId string) error
Constants ¶
View Source
const ( DefaultMasterRealm = "master" DefaultClientID = "tks" DefaultClientSecret = "secret" AdminCliClientID = "admin-cli" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IKeycloak ¶
type IKeycloak interface { InitializeKeycloak() error LoginAdmin(accountId string, password string) (*domain.User, error) Login(accountId string, password string, organizationId string) (*domain.User, error) Logout(sessionId string, organizationId string) error CreateRealm(organizationId string) (string, error) GetRealm(organizationId string) (*domain.Organization, error) GetRealms() ([]*domain.Organization, error) DeleteRealm(organizationId string) error UpdateRealm(organizationId string, organizationConfig domain.Organization) error CreateUser(organizationId string, user *gocloak.User) error GetUser(organizationId string, userAccountId string) (*gocloak.User, error) GetUsers(organizationId string) ([]*gocloak.User, error) DeleteUser(organizationId string, userAccountId string) error UpdateUser(organizationId string, user *gocloak.User) error JoinGroup(organizationId string, userId string, groupName string) error LeaveGroup(organizationId string, userId string, groupName string) error VerifyAccessToken(token string, organizationId string) error GetSessions(userId string, organizationId string) (*[]string, error) }
type Keycloak ¶
type Keycloak struct {
// contains filtered or unexported fields
}
func (*Keycloak) CreateRealm ¶
func (*Keycloak) CreateUser ¶
func (*Keycloak) DeleteRealm ¶
func (*Keycloak) DeleteUser ¶
func (*Keycloak) GetRealm ¶
func (k *Keycloak) GetRealm(organizationId string) (*domain.Organization, error)
func (*Keycloak) GetSessions ¶
func (*Keycloak) InitializeKeycloak ¶
func (*Keycloak) LeaveGroup ¶
func (*Keycloak) LoginAdmin ¶
func (*Keycloak) UpdateRealm ¶
func (k *Keycloak) UpdateRealm(organizationId string, organizationConfig domain.Organization) error
func (*Keycloak) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.