providers

package
v19.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyCloackClient

type KeyCloackClient struct {
	ClientID                  string   `json:"clientId,omitempty"`
	Secret                    string   `json:"secret,omitempty"`
	Name                      string   `json:"name,omitempty"`
	Enabled                   bool     `json:"enabled,omitempty"`
	PublicClient              bool     `json:"publicClient,omitempty"`
	Protocol                  string   `json:"protocol,omitempty"`
	DirectAccessGrantsEnabled bool     `json:"directAccessGrantsEnabled,omitempty"`
	StandardFlowEnabled       bool     `json:"standardFlowEnabled,omitempty"`
	RedirectURIs              []string `json:"redirectUris,omitempty"`
}

KeyCloackClient defines a KeyCloak client

type KeyCloackUser

type KeyCloackUser struct {
	ID                         string                   `json:"id,omitempty"`
	Origin                     string                   `json:"origin,omitempty"`
	CreatedTimestamp           uint64                   `json:"createdTimestamp,omitempty"`
	Username                   string                   `json:"username,omitempty"`
	Enabled                    bool                     `json:"enabled,omitempty"`
	EmailVerified              bool                     `json:"emailVerified,omitempty"`
	FirstName                  string                   `json:"firstName,omitempty"`
	LastName                   string                   `json:"lastName,omitempty"`
	Email                      string                   `json:"email,omitempty"`
	FederationLink             string                   `json:"federationLink,omitempty"`
	ServiceAccountClientID     string                   `json:"serviceAccountClientId,omitempty"`
	Attributes                 map[string]string        `json:"attributes,omitempty"`
	Credentials                []map[string]interface{} `json:"credentials,omitempty"`
	DisableableCredentialTypes []string                 `json:"disableableCredentialTypes,omitempty"`
	RequiredActions            []string                 `json:"requiredActions,omitempty"`
	FederatedIdentities        []map[string]interface{} `json:"federatedIdentities,omitempty"`
	RealmRoles                 []string                 `json:"realmRoles,omitempty"`
	ClientRoles                map[string]string        `json:"clientRoles,omitempty"`
	ClientConsents             []map[string]interface{} `json:"clientConsents,omitempty"`
	Groups                     []string                 `json:"groups,omitempty"`
}

KeyCloackUser defines a KeyCloak user

type KeyCloak

type KeyCloak struct {
	BaseURL   string
	Realm     string
	Usernamme string
	Password  string
}

KeyCloak class to manage KeyCloak admin API

func (*KeyCloak) CreateClientApplication

func (kc *KeyCloak) CreateClientApplication(clientID, clientSecret, clientName string) error

CreateClientApplication create a client application

func (*KeyCloak) CreateUser

func (kc *KeyCloak) CreateUser(name, email string, attrs map[string]interface{}) error

CreateUser create a user

func (*KeyCloak) GetAccessToken

func (kc *KeyCloak) GetAccessToken() (string, error)

GetAccessToken get keycloak admin api access token

type KeyCloakAdminToken

type KeyCloakAdminToken struct {
	AccessToken      string `json:"access_token,omitempty"`
	ExpiresIn        uint   `json:"expires_in,omitempty"`
	RefreshExpiresIn uint   `json:"refresh_expires_in,omitempty"`
	RefreshToken     string `json:"refresh_token,omitempty"`
	TokenType        string `json:"token_type,omitempty"`
	NotBeforePolicy  uint   `json:"not-before-policy,omitempty"`
	SessionState     string `json:"session_state,omitempty"`
	Scope            string `json:"scope,omitempty"`
}

KeyCloakAdminToken KeyCloak administration token structure

Jump to

Keyboard shortcuts

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