Documentation
¶
Index ¶
- type Generic
- func (p *Generic) ClientConfig() (*clientcredentials.Config, error)
- func (p *Generic) GetAuthURL() string
- func (p *Generic) GetAuthURLExternal() string
- func (p *Generic) GetCertURL() string
- func (p *Generic) GetClientID() string
- func (p *Generic) GetClientIDExternal() string
- func (p *Generic) GetClientSecret() string
- func (p *Generic) GetClientSecretExternal() string
- func (p *Generic) GetIntrospectURL() string
- func (p *Generic) GetLogoutURL() string
- func (p *Generic) GetLogoutURLExternal() string
- func (p *Generic) GetScopes() []string
- func (p *Generic) GetTokenURL() string
- func (p *Generic) GetTokenURLExternal() string
- type KeyCloak
- func (p *KeyCloak) ClientConfig() (*clientcredentials.Config, error)
- func (p *KeyCloak) GetAuthURL() string
- func (p *KeyCloak) GetAuthURLExternal() string
- func (p *KeyCloak) GetCertURL() string
- func (p *KeyCloak) GetClientID() string
- func (p *KeyCloak) GetClientIDExternal() string
- func (p *KeyCloak) GetClientSecret() string
- func (p *KeyCloak) GetClientSecretExternal() string
- func (p *KeyCloak) GetIntrospectURL() string
- func (p *KeyCloak) GetLogoutURL() string
- func (p *KeyCloak) GetLogoutURLExternal() string
- func (p *KeyCloak) GetScopes() []string
- func (p *KeyCloak) GetTokenURL() string
- func (p *KeyCloak) GetTokenURLExternal() string
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 (*Generic) GetAuthURLExternal ¶ added in v0.5.0
func (*Generic) GetCertURL ¶ added in v0.4.8
func (*Generic) GetClientID ¶ added in v0.4.8
func (*Generic) GetClientIDExternal ¶ added in v0.5.0
func (*Generic) GetClientSecret ¶ added in v0.4.8
func (*Generic) GetClientSecretExternal ¶ added in v0.5.0
func (*Generic) GetIntrospectURL ¶ added in v0.4.8
func (*Generic) GetLogoutURL ¶ added in v0.7.1
func (*Generic) GetLogoutURLExternal ¶ added in v0.7.1
func (*Generic) GetTokenURL ¶ added in v0.4.8
func (*Generic) GetTokenURLExternal ¶ added in v0.5.0
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 (*KeyCloak) GetAuthURLExternal ¶ added in v0.5.0
func (*KeyCloak) GetCertURL ¶ added in v0.4.0
func (*KeyCloak) GetClientID ¶ added in v0.2.1
func (*KeyCloak) GetClientIDExternal ¶ added in v0.5.0
func (*KeyCloak) GetClientSecret ¶ added in v0.2.1
func (*KeyCloak) GetClientSecretExternal ¶ added in v0.5.0
func (*KeyCloak) GetIntrospectURL ¶ added in v0.4.8
func (*KeyCloak) GetLogoutURL ¶ added in v0.7.1
func (*KeyCloak) GetLogoutURLExternal ¶ added in v0.7.1
func (*KeyCloak) GetTokenURL ¶ added in v0.2.1
func (*KeyCloak) GetTokenURLExternal ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.