Documentation ¶
Index ¶
Constants ¶
const ( DCOSOIDCAuth0 = "dcos-oidc-auth0" DCOSUsers = "dcos-users" )
This is a non-exhaustive list of login provider IDs for DC/OS.
const ( DCOSUIDPassword = "dcos-uid-password" // nolint: gosec DCOSUIDServiceKey = "dcos-uid-servicekey" DCOSUIDPasswordLDAP = "dcos-uid-password-ldap" // nolint: gosec SAMLSpInitiated = "saml-sp-initiated" OIDCAuthCodeFlow = "oidc-authorization-code-flow" OIDCImplicitFlow = "oidc-implicit-flow" )
These are the different login provider types that the DC/OS CLI supports.
Variables ¶
var ( // ErrAuthDisabled is the error returned when attempting to get authentication providers // from a cluster without authentication. ErrAuthDisabled = errors.New("authentication disabled") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is able to detect available login providers and login to DC/OS.
func NewClient ¶
func NewClient(baseClient *httpclient.Client, logger *logrus.Logger) *Client
NewClient creates a new login client.
type Credentials ¶
type Credentials struct { UID string `json:"uid,omitempty"` Password string `json:"password,omitempty"` Token string `json:"token,omitempty"` }
Credentials is the payload for login POST requests.
type Flags ¶
type Flags struct {
// contains filtered or unexported fields
}
Flags are command-line flags for a login flow.
func (*Flags) Resolve ¶
Resolve resolves credentials from --password-env, --password-file and --private-key flags.
func (*Flags) SetProviderID ¶
SetProviderID sets the provider ID.
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
Flow represents a login flow.
type FlowOpts ¶
type FlowOpts struct { Errout io.Writer Prompt *prompt.Prompt Logger *logrus.Logger Opener open.Opener }
FlowOpts are functional options for a Flow.
type JWT ¶
type JWT struct {
Token string `json:"token"`
}
JWT is the authentication token returned by the DC/OS login API.
type Provider ¶
type Provider struct { ID string `json:"-"` Type string `json:"authentication-type"` ClientMethod string `json:"client-method"` Config ProviderConfig `json:"config"` Description string `json:"description"` }
Provider is a DC/OS login provider.
type ProviderConfig ¶
type ProviderConfig struct {
StartFlowURL string `json:"start_flow_url"`
}
ProviderConfig holds login provider specific configuration.