sso

package
v2.3.0-rc3.0...-dacd7d6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix = "Bearer v2:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Issuer       string                  `json:"issuer"`
	ClientID     apiv1.SecretKeySelector `json:"clientId"`
	ClientSecret apiv1.SecretKeySelector `json:"clientSecret"`
	RedirectURL  string                  `json:"redirectUrl"`
	RBAC         *rbac.Config            `json:"rbac,omitempty"`
	// additional scopes (on top of "openid")
	Scopes        []string        `json:"scopes,omitempty"`
	SessionExpiry metav1.Duration `json:"sessionExpiry,omitempty"`
}

func (Config) GetSessionExpiry

func (c Config) GetSessionExpiry() time.Duration

type Interface

type Interface interface {
	Authorize(authorization string) (*types.Claims, error)
	HandleRedirect(writer http.ResponseWriter, request *http.Request)
	HandleCallback(writer http.ResponseWriter, request *http.Request)
	IsRBACEnabled() bool
}
var NullSSO Interface = nullService{}

func New

func New(c Config, secretsIf corev1.SecretInterface, baseHRef string, secure bool) (Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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