auths

package
v0.0.1-dev-a10d1fb Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tokens = "tokens"
	Logout = "logout"

	Saml = "saml"
	Oidc = "oidc"
	None = "none"
)

Variables

View Source
var (
	DefaultKeycloakRealm       = "master"
	DefaultIdpSamlMetadataPath = fmt.Sprintf("/auth/realms/%s/protocol/saml/descriptor", DefaultKeycloakRealm)
	DefaultSpSamlMetadataPath  = "/saml/metadata"
	DefaultApiServerKey        = "/var/www/certs/server.key"
	DefaultApiServerCert       = "/var/www/certs/server.cert"
	DefaultIdentifierFormat    = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"

	DefaultAdminProject     = "admin"
	DefaultOidcClientId     = "cube-cos-api"
	DefaultOidcClientSecret = ""
	DefaultOidcClientOpts   = gocloak.Client{
		ClientID:                  gocloak.StringP(DefaultOidcClientId),
		Protocol:                  gocloak.StringP("openid-connect"),
		PublicClient:              gocloak.BoolP(false),
		ClientAuthenticatorType:   gocloak.StringP("client-secret"),
		StandardFlowEnabled:       gocloak.BoolP(true),
		DirectAccessGrantsEnabled: gocloak.BoolP(true),
		Attributes: &map[string]string{
			"access.token.lifespan": "7200",
		},
	}

	DefaultNodeToken    = ""
	RedirectUrl         = ""
	RedirectPath        = ""
	DefaultRedirectPath = "/home"
)

Functions

This section is empty.

Types

type User

type User struct {
	Name     string `json:"name"`
	Password string `json:"password"`
}

func (User) IsNameEmpty

func (u User) IsNameEmpty() bool

func (User) IsPasswordEmpty

func (u User) IsPasswordEmpty() bool

Jump to

Keyboard shortcuts

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