providers

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generic added in v0.4.8

type Generic struct {

	// ClientID is the application's ID.
	ClientID string `cfg:"client_id"`

	// ClientIDExternal for reaching the client id from outside.
	ClientIDExternal string `cfg:"client_id_external"`

	// ClientSecret is the application's secret.
	ClientSecret string `cfg:"client_secret" log:"false"`

	// ClientSecretExternal for reaching the client secret from outside.
	ClientSecretExternal string `cfg:"client_secret_external"`

	// Scope specifies optional requested permissions.
	Scopes []string `cfg:"scopes"`

	// CertURL is the resource server's public key URL.
	//
	// BaseURL and REALM are used to construct the CertURL.
	CertURL string `cfg:"cert_url"`

	// IntrospectURL is the check the active or not with request.
	IntrospectURL string `cfg:"introspect_url"`

	// AuthURL is the resource server's authorization endpoint
	// use for redirection to login page.
	//
	// BaseURL and REALM are used to construct the AuthURL.
	AuthURL string `cfg:"auth_url"`

	// AuthURLExternal for reaching the auth page from outside.
	//
	// Default is AuthURL.
	AuthURLExternal string `cfg:"auth_url_external"`

	// TokenURL is the resource server's token endpoint
	// URL. This is a constant specific to each server.
	//
	// BaseURL and REALM are used to construct the TokenURL.
	TokenURL string `cfg:"token_url"`

	// TokenURLExternal for reaching the token page from outside.
	//
	// Default is TokenURL.
	TokenURLExternal string `cfg:"token_url_external"`

	LogoutURL string `cfg:"logout_url"`
	// LogoutURLExternal for reaching the logout url from outside.
	// Default is LogoutURL.
	LogoutURLExternal string `cfg:"logout_url_external"`
}

func (*Generic) ClientConfig added in v0.4.8

func (p *Generic) ClientConfig() (*clientcredentials.Config, error)

func (*Generic) GetAuthURL added in v0.4.8

func (p *Generic) GetAuthURL() string

func (*Generic) GetAuthURLExternal added in v0.5.0

func (p *Generic) GetAuthURLExternal() string

func (*Generic) GetCertURL added in v0.4.8

func (p *Generic) GetCertURL() string

func (*Generic) GetClientID added in v0.4.8

func (p *Generic) GetClientID() string

func (*Generic) GetClientIDExternal added in v0.5.0

func (p *Generic) GetClientIDExternal() string

func (*Generic) GetClientSecret added in v0.4.8

func (p *Generic) GetClientSecret() string

func (*Generic) GetClientSecretExternal added in v0.5.0

func (p *Generic) GetClientSecretExternal() string

func (*Generic) GetIntrospectURL added in v0.4.8

func (p *Generic) GetIntrospectURL() string

func (*Generic) GetLogoutURL added in v0.7.1

func (p *Generic) GetLogoutURL() string

func (*Generic) GetLogoutURLExternal added in v0.7.1

func (p *Generic) GetLogoutURLExternal() string

func (*Generic) GetScopes added in v0.4.8

func (p *Generic) GetScopes() []string

func (*Generic) GetTokenURL added in v0.4.8

func (p *Generic) GetTokenURL() string

func (*Generic) GetTokenURLExternal added in v0.5.0

func (p *Generic) GetTokenURLExternal() string

type KeyCloak

type KeyCloak struct {

	// ClientID is the application's ID.
	ClientID string `cfg:"client_id"`

	// ClientIDExternal for reaching the client id from outside.
	ClientIDExternal string `cfg:"client_id_external"`

	// ClientSecret is the application's secret.
	ClientSecret string `cfg:"client_secret" log:"false"`

	// ClientSecretExternal for reaching the client secret from outside.
	ClientSecretExternal string `cfg:"client_secret_external"`

	// Scope specifies optional requested permissions.
	Scopes []string `cfg:"scopes"`

	// CertURL is the resource server's public key URL.
	//
	// BaseURL and REALM are used to construct the CertURL.
	CertURL string `cfg:"cert_url"`

	// IntrospectURL is the check the active or not with request.
	IntrospectURL string `cfg:"introspect_url"`

	// AuthURL is the resource server's authorization endpoint
	// use for redirection to login page.
	//
	// BaseURL and REALM are used to construct the AuthURL.
	AuthURL string `cfg:"auth_url"`

	// AuthURLExternal for reaching the auth page from outside.
	//
	// Default is AuthURL.
	AuthURLExternal string `cfg:"auth_url_external"`

	// TokenURL is the resource server's token endpoint
	// URL. This is a constant specific to each server.
	//
	// BaseURL and REALM are used to construct the TokenURL.
	TokenURL string `cfg:"token_url"`

	// TokenURLExternal for reaching the token page from outside.
	//
	// Default is TokenURL.
	TokenURLExternal string `cfg:"token_url_external"`

	// BaseURL is the resource server's base URL like https://keycloak:8080.
	//
	// If your server has auth path set like https://keycloak:8080/auth/
	BaseURL string `cfg:"base_url"`

	// BaseURLExternal for reaching the base url from outside.
	//
	// Default is BaseURL.
	BaseURLExternal string `cfg:"base_url_external"`

	LogoutURL string `cfg:"logout_url"`
	// LogoutURLExternal for reaching the logout url from outside.
	// Default is LogoutURL.
	LogoutURLExternal string `cfg:"logout_url_external"`
	// Realm is the resource server's realm like master.
	Realm string `cfg:"realm"`
}

func (*KeyCloak) ClientConfig added in v0.4.0

func (p *KeyCloak) ClientConfig() (*clientcredentials.Config, error)

func (*KeyCloak) GetAuthURL added in v0.2.1

func (p *KeyCloak) GetAuthURL() string

func (*KeyCloak) GetAuthURLExternal added in v0.5.0

func (p *KeyCloak) GetAuthURLExternal() string

func (*KeyCloak) GetCertURL added in v0.4.0

func (p *KeyCloak) GetCertURL() string

func (*KeyCloak) GetClientID added in v0.2.1

func (p *KeyCloak) GetClientID() string

func (*KeyCloak) GetClientIDExternal added in v0.5.0

func (p *KeyCloak) GetClientIDExternal() string

func (*KeyCloak) GetClientSecret added in v0.2.1

func (p *KeyCloak) GetClientSecret() string

func (*KeyCloak) GetClientSecretExternal added in v0.5.0

func (p *KeyCloak) GetClientSecretExternal() string

func (*KeyCloak) GetIntrospectURL added in v0.4.8

func (p *KeyCloak) GetIntrospectURL() string

func (*KeyCloak) GetLogoutURL added in v0.7.1

func (p *KeyCloak) GetLogoutURL() string

func (*KeyCloak) GetLogoutURLExternal added in v0.7.1

func (p *KeyCloak) GetLogoutURLExternal() string

func (*KeyCloak) GetScopes added in v0.4.8

func (p *KeyCloak) GetScopes() []string

func (*KeyCloak) GetTokenURL added in v0.2.1

func (p *KeyCloak) GetTokenURL() string

func (*KeyCloak) GetTokenURLExternal added in v0.5.0

func (p *KeyCloak) GetTokenURLExternal() string

Jump to

Keyboard shortcuts

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