auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

type Auth

type Auth interface {
	Kf(token *stdjwt.Token) (interface{}, error)
	KeycloakClaimsFactory() stdjwt.Claims
}

func NewAuth

func NewAuth(keycloakHost string, keycloakPort string, keycloakProtocol string, keycloakRealm string, keycloakCA string) Auth

type KeycloakClaims

type KeycloakClaims struct {
	Type                      string   `json:"typ,omitempty"`
	AuthorizedParty           string   `json:"azp,omitempty"`
	Nonce                     string   `json:"nonce,omitempty"`
	AuthTime                  int64    `json:"auth_time,omitempty"`
	SessionState              string   `json:"session_state,omitempty"`
	AuthContextClassReference string   `json:"acr,omitempty"`
	AllowedOrigins            []string `json:"allowed-origins,omitempty"`
	RealmAccess               Roles    `json:"realm_access,omitempty"`
	ResourceAccess            Account  `json:"resource_access,omitempty"`
	Scope                     string   `json:"scope,omitempty"`
	EmailVerified             bool     `json:"email_verified,omitempty"`
	FullName                  string   `json:"name,omitempty"`
	PreferredUsername         string   `json:"preferred_username,omitempty"`
	GivenName                 string   `json:"given_name,omitempty"`
	FamilyName                string   `json:"family_name,omitempty"`
	Email                     string   `json:"email,omitempty"`
	stdjwt.StandardClaims
}

type KeycloakPublic

type KeycloakPublic struct {
	Realm           string `json:"realm"`
	PublicKey       string `json:"public_key"`
	TokenService    string `json:"token-service"`
	AccountService  string `json:"account-service"`
	TokensNotBefore int    `json:"tokens-not-before"`
}

type Roles

type Roles struct {
	RoleNames []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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