oauth

package
v0.1.1-0...-f02a436 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIVersion is the apiVersion string
	APIVersion = "config.openshift.io/v1"
	// OAuthNamespace is namespace for oauth manifests
	OAuthNamespace = "openshift-config"
)

Variables

This section is empty.

Functions

func Validate

func Validate(identityProviders []IdentityProvider) error

Validate validate oauth providers

Types

type CA

type CA struct {
	Name string `json:"name"`
}

CA secret name

type ClientSecret

type ClientSecret struct {
	Name string `json:"name"`
}

ClientSecret is a client secret for a privuder

type IdentityProvider

type IdentityProvider struct {
	Kind          string
	APIVersion    string
	MappingMethod string
	Name          string
	Provider      runtime.RawExtension
	HTFileName    string
	HTFileData    []byte
	CAData        []byte
	CrtData       []byte
	KeyData       []byte
}

IdentityProvider stores an identity provider

type Provider

type Provider struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	File       string `json:"file"`
	CA         string `json:"ca"`
	CertFile   string `json:"certFile"`
	KeyFile    string `json:"keyFile"`
}

Provider contains an identity providers type specific provider data

type ProviderResources

type ProviderResources struct {
	IDP        *configv1.IdentityProvider
	Secrets    []*corev1.Secret
	ConfigMaps []*corev1.ConfigMap
}

ProviderResources stores all resources related to one provider

type ResultResources

type ResultResources struct {
	OAuthCRD   *configv1.OAuth
	Secrets    []*corev1.Secret
	ConfigMaps []*corev1.ConfigMap
}

ResultResources stores all oAuth config parts

func Translate

func Translate(identityProviders []IdentityProvider, tokenConfig TokenConfig, templates legacyconfigv1.OAuthTemplates) (*ResultResources, error)

Translate converts OCPv3 OAuth to OCPv4 OAuth Custom Resources

type TLSClientCert

type TLSClientCert struct {
	Name string `json:"name"`
}

TLSClientCert secret name

type TLSClientKey

type TLSClientKey struct {
	Name string `json:"name"`
}

TLSClientKey secret name

type TokenConfig

type TokenConfig struct {
	AuthorizeTokenMaxAgeSeconds int32
	AccessTokenMaxAgeSeconds    int32
}

TokenConfig store internal OAuth tokens duration

Jump to

Keyboard shortcuts

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