keycloak

package
v0.6.72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 5 Imported by: 0

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)
	UpdateUser(firstName string, lastName string, username string, attributes map[string][]string, realmRoles []string) (bool, error)
}

func NewKeycloak

func NewKeycloak(ctx context.Context, realm string, server string, clientId string, clientSecret string, isDebug bool) (IKeycloak, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL