oauthserviceaccountclient

package
v0.0.0-...-201d816 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

View Source
const (
	OAuthWantChallengesAnnotationPrefix = "serviceaccounts.openshift.io/oauth-want-challenges"

	// Prefix used for statically specifying redirect URIs for a service account via annotations
	// The value can be partially supplied with the dynamic prefix to override the resource's defaults
	OAuthRedirectModelAnnotationURIPrefix = "serviceaccounts.openshift.io/oauth-redirecturi."

	// Prefix used for dynamically specifying redirect URIs using resources for a service account via annotations
	OAuthRedirectModelAnnotationReferencePrefix = "serviceaccounts.openshift.io/oauth-redirectreference."
)

Variables

This section is empty.

Functions

func IsServiceAccountToken

func IsServiceAccountToken(secret *corev1.Secret, sa *corev1.ServiceAccount) bool

IsServiceAccountToken returns true if the secret is a valid api token for the service account

Types

type OAuthClientGetter

type OAuthClientGetter interface {
	Get(ctx context.Context, name string, options metav1.GetOptions) (*oauthv1.OAuthClient, error)
}

OAuthClientGetter exposes a way to get a specific client. This is useful for other registries to get scope limitations on particular clients. This interface will make its easier to write a future cache on it

func NewServiceAccountOAuthClientGetter

func NewServiceAccountOAuthClientGetter(
	saClient kcoreclient.ServiceAccountsGetter,
	secretClient kcoreclient.SecretsGetter,
	eventClient kcoreclient.EventInterface,
	routeClient routev1client.RoutesGetter,
	delegate OAuthClientGetter,
	grantMethod oauthv1.GrantHandlerType,
) OAuthClientGetter

Jump to

Keyboard shortcuts

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