oidc

package
v0.0.0-...-3eb0fa6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package oidc is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResult

type AuthResult struct {
	Token   *oauth2.Token
	IDToken *oidc.IDToken
	Profile map[string]interface{}
}

AuthResult - OpenID ConnectによるID Token取得の結果

type Authenticator

type Authenticator interface {
	// Login - OpenID Connect Providerへのredirect URLとstateを生成する
	Login(ctx context.Context) (redirectURL, state string, err error)

	// Logout - OpenID Connectでログアウトする
	Logout(ctx context.Context) (logoutURL string, err error)

	// Callback - 外部からのCallbackを検証する
	Callback(ctx context.Context, expectedState, actualState, code string) (*AuthResult, error)
}

Authenticator - OpenID Connectによる認証を行う

func NewAuthenticator

func NewAuthenticator(ctx context.Context, clientID, clientSecret, redirectURL, providerURL string, scopes []string) (Authenticator, error)

NewAuthenticator initializes an Authenticator

type MockAuthenticator

type MockAuthenticator struct {
	// contains filtered or unexported fields
}

MockAuthenticator is a mock of Authenticator interface.

func NewMockAuthenticator

func NewMockAuthenticator(ctrl *gomock.Controller) *MockAuthenticator

NewMockAuthenticator creates a new mock instance.

func (*MockAuthenticator) Callback

func (m *MockAuthenticator) Callback(ctx context.Context, expectedState, actualState, code string) (*AuthResult, error)

Callback mocks base method.

func (*MockAuthenticator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthenticator) Login

func (m *MockAuthenticator) Login(ctx context.Context) (string, string, error)

Login mocks base method.

func (*MockAuthenticator) Logout

func (m *MockAuthenticator) Logout(ctx context.Context) (string, error)

Logout mocks base method.

type MockAuthenticatorMockRecorder

type MockAuthenticatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthenticatorMockRecorder is the mock recorder for MockAuthenticator.

func (*MockAuthenticatorMockRecorder) Callback

func (mr *MockAuthenticatorMockRecorder) Callback(ctx, expectedState, actualState, code interface{}) *gomock.Call

Callback indicates an expected call of Callback.

func (*MockAuthenticatorMockRecorder) Login

func (mr *MockAuthenticatorMockRecorder) Login(ctx interface{}) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthenticatorMockRecorder) Logout

func (mr *MockAuthenticatorMockRecorder) Logout(ctx interface{}) *gomock.Call

Logout indicates an expected call of Logout.

Jump to

Keyboard shortcuts

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