Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationMode ¶
type AuthenticationMode string
const ( TokenAuth AuthenticationMode = "token" CertAuth AuthenticationMode = "cert" )
type Client ¶
type Client interface {
Login() (*Credentials, error)
}
type Credentials ¶
type Credentials struct {
User struct {
Name string `json:"name"`
Groups []string `json:"groups"`
// Token is an ID token containing user info and capabilities loaded at login
Token string `json:"token"`
// WrappedToken is a very short lifetime encrypted token that wraps the ID token.
// It's for cases where the token must be exposed as HTTP GET parameters over a
// secure connection where the token will available in access logs and/or browser
// history which would mean a potential security risk.
WrappedToken string `json:"wrappedToken"`
} `json:"user"`
}
type RequestBody ¶
type RequestBody struct {
Mode AuthenticationMode `json:"mode"`
Token string `json:"token,omitempty"`
ClientCert struct {
// base64 encoded client key
Key string `json:"key"`
// base64 encoded client cert
Cert string `json:"cert"`
} `json:"cert,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.