Documentation ¶
Index ¶
- Constants
- type CompletedOAuthConfig
- type ExtraOAuthConfig
- type OAuthServer
- type OAuthServerConfig
- func (c *OAuthServerConfig) Complete() completedOAuthConfig
- func (c *OAuthServerConfig) StartOAuthClientsBootstrapping(context genericapiserver.PostStartHookContext) error
- func (c *OAuthServerConfig) WithOAuth(handler http.Handler, requestContextMapper request.RequestContextMapper) (http.Handler, error)
Constants ¶
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 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 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.RouteV1Interface UserClient userclient.UserInterface IdentityClient userclient.IdentityInterface UserIdentityMappingClient userclient.UserIdentityMappingInterface OAuthAccessTokenClient oauthclient.OAuthAccessTokenInterface OAuthAuthorizeTokenClient oauthclient.OAuthAuthorizeTokenInterface OAuthClientClient oauthclient.OAuthClientInterface OAuthClientAuthorizationClient oauthclient.OAuthClientAuthorizationInterface SessionAuth *session.Authenticator HandlerWrapper handlerWrapper }
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 configapi.OAuthConfig, userClientConfig *rest.Config) (*OAuthServerConfig, error)
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, 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.