oauthserver

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 76 Imported by: 34

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletedOAuthConfig

type CompletedOAuthConfig struct {
	// contains filtered or unexported fields
}

func (CompletedOAuthConfig) New

func (c CompletedOAuthConfig) New(delegationTarget genericapiserver.DelegationTarget) (*OAuthServer, error)

this server is odd. It doesn't delegate. We mostly leave it alone, so I don't plan to make it look "normal". We'll model it as a separate API server to reason about its handling chain, but otherwise, just let it be

type ExtraOAuthConfig

type ExtraOAuthConfig struct {
	Options osinv1.OAuthConfig

	// 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.RouteV1Interface

	UserClient                userclient.UserInterface
	IdentityClient            userclient.IdentityInterface
	UserIdentityMappingClient userclient.UserIdentityMappingInterface

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

	SessionAuth session.SessionAuthenticator

	BootstrapUserDataGetter bootstrap.BootstrapUserDataGetter
}

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.RecommendedConfig
	ExtraOAuthConfig ExtraOAuthConfig
}

func NewOAuthServerConfig

func NewOAuthServerConfig(oauthConfig osinv1.OAuthConfig, userClientConfig *rest.Config, genericConfig *genericapiserver.RecommendedConfig) (*OAuthServerConfig, error)

TODO we need to switch the oauth server to an external type, but that can be done after we get our externally facing flag values fixed TODO remaining bits involve the session file, LDAP util code, validation, ...

func (*OAuthServerConfig) Complete

func (c *OAuthServerConfig) Complete() completedOAuthConfig

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

func (*OAuthServerConfig) StartOAuthClientsBootstrapping

func (c *OAuthServerConfig) StartOAuthClientsBootstrapping(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) 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