types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryOAuth2TokenStore added in v0.0.4

type MemoryOAuth2TokenStore struct {
	Tokens map[string]*oauth2.Token
	Config *oauth2.Config
}

func NewMemoryOAuth2TokenStore added in v0.0.4

func NewMemoryOAuth2TokenStore() *MemoryOAuth2TokenStore

func (*MemoryOAuth2TokenStore) Get added in v0.0.4

func (*MemoryOAuth2TokenStore) Set added in v0.0.4

func (s *MemoryOAuth2TokenStore) Set(key string, token *oauth2.Token)

func (*MemoryOAuth2TokenStore) SetOAuth2Config added in v0.0.4

func (s *MemoryOAuth2TokenStore) SetOAuth2Config(config *oauth2.Config)

type MemoryTokenStore

type MemoryTokenStore struct {
	Tokens map[string]string
}

func NewMemoryTokenStore

func NewMemoryTokenStore() *MemoryTokenStore

func (*MemoryTokenStore) Get

func (s *MemoryTokenStore) Get(sessionID string) string

func (*MemoryTokenStore) Set

func (s *MemoryTokenStore) Set(sessionID, value string)

type OAuth2TokenStore added in v0.0.4

type OAuth2TokenStore interface {
	SetOAuth2Config(*oauth2.Config)
	Set(string, *oauth2.Token)
	Get(string) oauth2.TokenSource
}

type SSHSessionOauthHandler

type SSHSessionOauthHandler interface {
	HandleAuth(w http.ResponseWriter, r *http.Request)
	HandleAuthCallback(w http.ResponseWriter, r *http.Request)
	HandleUser(w http.ResponseWriter, r *http.Request)
	// Return nil to call SessionHandler directly
	DefaultCommand() []string
	SSHSessionCommandHandler(ssh.Session, *exec.Cmd) error
	SessionHandler(ssh.Session)
}

type TokenStore

type TokenStore interface {
	Get(sessionID string) string
	Set(sessionID, value string)
}

Jump to

Keyboard shortcuts

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