Documentation ¶
Index ¶
- Constants
- func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, assetPublicAddresses []string, ...) error
- type OAuthServer
- type OAuthServerConfig
- func (c *OAuthServerConfig) Complete() completedOAuthServerConfig
- func (c *OAuthServerConfig) NewOpenShiftOAuthClientConfig(client *oauthapi.OAuthClient) *osincli.ClientConfig
- func (c *OAuthServerConfig) SkipComplete() completedOAuthServerConfig
- func (c *OAuthServerConfig) WithOAuth(handler http.Handler) (http.Handler, error)
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.
Click to show internal directories.
Click to hide internal directories.