oauth

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindTokenReview = "TokenReview"
)

Variables

This section is empty.

Functions

func AddToContainer

func AddToContainer(c *restful.Container, im im.IdentityManagementInterface,
	tokenOperator auth.TokenManagementInterface,
	passwordAuthenticator auth.PasswordAuthenticator,
	oauth2Authenticator auth.OAuthAuthenticator,
	loginRecorder auth.LoginRecorder,
	options *authoptions.AuthenticationOptions) error

ks-apiserver includes a built-in OAuth server. Users obtain OAuth access tokens to authenticate themselves to the API. The OAuth server supports standard authorization code grant and the implicit grant OAuth authorization flows. All requests for OAuth tokens involve a request to <ks-apiserver>/oauth/authorize. Most authentication integrations place an authenticating proxy in front of this endpoint, or configure ks-apiserver to validate credentials against a backing identity provider. Requests to <ks-apiserver>/oauth/authorize can come from user-agents that cannot display interactive login pages, such as the CLI.

Types

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" description:"username"`
	Password string `json:"password" description:"password"`
}

type Spec

type Spec struct {
	Token string `json:"token" description:"access token"`
}

type Status

type Status struct {
	Authenticated bool                   `json:"authenticated" description:"is authenticated"`
	User          map[string]interface{} `json:"user,omitempty" description:"user info"`
}

type TokenReview

type TokenReview struct {
	APIVersion string  `json:"apiVersion" description:"Kubernetes API version"`
	Kind       string  `json:"kind" description:"kind of the API object"`
	Spec       *Spec   `json:"spec,omitempty"`
	Status     *Status `json:"status,omitempty" description:"token review status"`
}

func (*TokenReview) Validate

func (request *TokenReview) Validate() error

Jump to

Keyboard shortcuts

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