dockerauth

package
v0.0.0-...-8d7722f Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResult

type AuthResult struct {
	Scope            common.AuthScope
	AutorizedActions []string
}

type AuthType

type AuthType string
var (
	AuthTypeJWT   AuthType = "jwt"
	AuthTypeOAuth AuthType = "oauth"
	AuthTypeNone  AuthType = "none"
)

type DockerAuth

type DockerAuth struct {
	ProxyConfig          *ProxyConfig
	Auth                 userauth.Auth
	DockerPolicyAuth     policycommon.DockerPolicyAuth
	JWT                  *JWTConfig
	CurrentServiceDomain string
	AuthPath             string
}

func (*DockerAuth) AuthClient

func (c *DockerAuth) AuthClient(ctx context.Context, w http.ResponseWriter, r *http.Request)

AuthClient do request Auth from this method

func (*DockerAuth) Authorize

func (r *DockerAuth) Authorize(ar *common.AuthRequest) ([]common.AuthResult, error)

func (*DockerAuth) CreateToken

func (t *DockerAuth) CreateToken(ar *common.AuthRequest, ares []common.AuthResult) (string, error)

func (*DockerAuth) GetRealmUrl

func (t *DockerAuth) GetRealmUrl() string

func (*DockerAuth) ParseRequest

func (r *DockerAuth) ParseRequest(req *http.Request) (*common.AuthRequest, error)

func (*DockerAuth) ParseScope

func (t *DockerAuth) ParseScope(scopeStr string) (*common.AuthScope, error)

type JWTConfig

type JWTConfig struct {
	Issuer         string
	CertKeyPath    string
	PrivateKeyPath string
	Expiration     int
	// contains filtered or unexported fields
}

type ProxyConfig

type ProxyConfig struct {
	RealIPHeader string
	RealIPPos    int
}

Directories

Path Synopsis
kubernetes/v1alpha1
Package v1alpha1 contains API Schema definitions for the helmops v1alpha1 API group +kubebuilder:object:generate=true +groupName=helmops.shijunlee.net
Package v1alpha1 contains API Schema definitions for the helmops v1alpha1 API group +kubebuilder:object:generate=true +groupName=helmops.shijunlee.net

Jump to

Keyboard shortcuts

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