auth

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthenticator

type BasicAuthenticator struct {
	Username string
	Password string
}

func (*BasicAuthenticator) Configure

func (o *BasicAuthenticator) Configure(cfg map[string]interface{}) error

func (*BasicAuthenticator) EncodeHeader

func (o *BasicAuthenticator) EncodeHeader() (string, error)

type IAuthenticator

type IAuthenticator interface {
	Configure(cfg map[string]interface{}) error
	EncodeHeader() (string, error)
}

type Method

type Method string

Method is the enumeration of authentication methods supported by Veraison service. It implements the pflag.Value interface.

const (
	MethodPassthrough Method = "passthrough"
	MethodBasic       Method = "basic"
	MethodOauth2      Method = "oauth2"
)

func (*Method) Set

func (o *Method) Set(v string) error

Set the value of the Method

func (*Method) String

func (o *Method) String() string

String representation of the Method

func (*Method) Type

func (o *Method) Type() string

Type returns the string representing the type name (used by pflag).

type NullAuthenticator

type NullAuthenticator struct{}

func (*NullAuthenticator) Configure

func (o *NullAuthenticator) Configure(cfg map[string]interface{}) error

func (*NullAuthenticator) EncodeHeader

func (o *NullAuthenticator) EncodeHeader() (string, error)

type Oauth2Authenticator

type Oauth2Authenticator struct {
	TokenURL     string
	ClientID     string
	ClientSecret string
	Username     string
	Password     string

	Token *oauth2.Token
}

func (*Oauth2Authenticator) Configure

func (o *Oauth2Authenticator) Configure(cfg map[string]interface{}) error

func (*Oauth2Authenticator) EncodeHeader

func (o *Oauth2Authenticator) EncodeHeader() (string, error)

Jump to

Keyboard shortcuts

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