apiserver

package
v3.7.0-0.108.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 76 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenShiftOAuthCallbackPrefix = "/oauth2callback"
	OpenShiftWebConsoleClientID  = "openshift-web-console"
	OpenShiftBrowserClientID     = "openshift-browser-client"
	OpenShiftCLIClientID         = "openshift-challenging-client"
)

Variables

This section is empty.

Functions

func CreateOrUpdateDefaultOAuthClients

func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, assetPublicAddresses []string, clientRegistry clientregistry.Registry) error

Types

type OAuthServer

type OAuthServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer

	PublicURL url.URL
}

OAuthServer serves non-API endpoints for openshift.

type OAuthServerConfig

type OAuthServerConfig struct {
	GenericConfig *genericapiserver.Config

	Options configapi.OAuthConfig

	// AssetPublicAddresses contains valid redirectURI prefixes to direct browsers to the web console
	AssetPublicAddresses []string

	// KubeClient is kubeclient with enough permission for the auth API
	KubeClient kclientset.Interface

	// OpenShiftClient is osclient with enough permission for the auth API
	OpenShiftClient osclient.Interface

	// RESTOptionsGetter provides storage and RESTOption lookup
	RESTOptionsGetter restoptions.Getter

	// EtcdBackends is a list of storage interfaces, each of which talks to a single etcd backend.
	// These are only used to ensure newly created tokens are distributed to all backends before returning them for use.
	// EtcdHelper should normally be used for storage functions.
	EtcdBackends []storage.Interface

	UserClient                userclient.UserResourceInterface
	IdentityClient            userclient.IdentityInterface
	UserIdentityMappingClient userclient.UserIdentityMappingInterface

	SessionAuth *session.Authenticator

	HandlerWrapper handlerWrapper
}

func NewOAuthServerConfig

func NewOAuthServerConfig(oauthConfig configapi.OAuthConfig, userClientConfig *rest.Config) (*OAuthServerConfig, error)

func (*OAuthServerConfig) Complete

func (c *OAuthServerConfig) Complete() completedOAuthServerConfig

Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.

func (*OAuthServerConfig) NewOpenShiftOAuthClientConfig

func (c *OAuthServerConfig) NewOpenShiftOAuthClientConfig(client *oauthapi.OAuthClient) *osincli.ClientConfig

NewOpenShiftOAuthClientConfig provides config for OpenShift OAuth client

func (*OAuthServerConfig) SkipComplete

func (c *OAuthServerConfig) SkipComplete() completedOAuthServerConfig

SkipComplete provides a way to construct a server instance without config completion.

func (*OAuthServerConfig) WithOAuth

func (c *OAuthServerConfig) WithOAuth(handler http.Handler) (http.Handler, error)

WithOAuth decorates the given handler by serving the OAuth2 endpoints while passing through all other requests to the given handler.

Jump to

Keyboard shortcuts

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