apiserver

package
v3.7.0-rc.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 82 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

This section is empty.

Types

type OAuthAPIServer

type OAuthAPIServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
}

type OAuthAPIServerConfig

type OAuthAPIServerConfig struct {
	GenericConfig *genericapiserver.Config

	CoreAPIServerClientConfig *restclient.Config
	ServiceAccountMethod      configapi.GrantHandlerType

	// TODO these should all become local eventually
	Scheme   *runtime.Scheme
	Registry *registered.APIRegistrationManager
	Codecs   serializer.CodecFactory
	// contains filtered or unexported fields
}

func (*OAuthAPIServerConfig) Complete

func (c *OAuthAPIServerConfig) Complete() completedConfig

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

func (*OAuthAPIServerConfig) SkipComplete

func (c *OAuthAPIServerConfig) SkipComplete() completedConfig

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

func (*OAuthAPIServerConfig) V1RESTStorage

func (c *OAuthAPIServerConfig) V1RESTStorage() (map[string]rest.Storage, error)

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

	// EventsClient is for creating user events
	EventsClient corev1.EventInterface

	// RouteClient provides a client for OpenShift routes API.
	RouteClient routeclient.Interface

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

	OAuthAccessTokenClient         oauthclient.OAuthAccessTokenInterface
	OAuthAuthorizeTokenClient      oauthclient.OAuthAuthorizeTokenInterface
	OAuthClientClient              oauthclient.OAuthClientInterface
	OAuthClientAuthorizationClient oauthclient.OAuthClientAuthorizationInterface

	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) EnsureBootstrapOAuthClients

func (c *OAuthServerConfig) EnsureBootstrapOAuthClients(context genericapiserver.PostStartHookContext) error

TODO, this moves to the `apiserver.go` when we have it for this group TODO TODO, this actually looks a lot like a controller or an add-on manager style thing. Seems like we'd want to do this outside EnsureBootstrapOAuthClients creates or updates the bootstrap oauth clients that openshift relies upon.

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, requestContextMapper request.RequestContextMapper) (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