unix_server

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BearerAuth

func BearerAuth(r *http.Request) (bearer string, ok bool)

BearerAuth returns the bearer token Authorization header, if the request uses HTTP Basic Authentication. See RFC 2617, Section 2.

func DefaultIdentitiesFileNames

func DefaultIdentitiesFileNames(user *unix_util.User) []string

func HandleAuths

func HandleAuths(ctx context.Context, enablePasswordLogin bool, defaultMaxPacketSize uint64, handlerFunc ssh3.AuthenticatedHandlerFunc) (http.HandlerFunc, error)

func HandleBasicAuth

func HandleBasicAuth(handlerFunc ssh3.AuthenticatedHandlerFunc, conv *ssh3.Conversation) http.HandlerFunc

func HandleBearerAuth

func HandleBearerAuth(username string, base64ConversationID string, handlerFunc ssh3.UnauthenticatedBearerFunc) http.HandlerFunc

func HandleJWTAuth

func HandleJWTAuth(username string, newConv *ssh3.Conversation, handlerFunc ssh3.AuthenticatedHandlerFunc) ssh3.UnauthenticatedBearerFunc

currently only supports RS256 and EdDSA signing algorithms

Types

type Identity

type Identity interface {
	// returns whether those the provided candidate contains a sufficient proof to
	// be considered as equivalent to this identity
	Verify(candidate interface{}, base64ConversationID string) bool
}

func ParseAuthorizedIdentitiesFile

func ParseAuthorizedIdentitiesFile(user *unix_util.User, file *os.File) (identities []Identity, err error)

func ParseIdentity

func ParseIdentity(user *unix_util.User, identityStr string) (Identity, error)

type OpenIDConnectIdentity

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

func (*OpenIDConnectIdentity) Verify

func (i *OpenIDConnectIdentity) Verify(genericCandidate interface{}, base64ConversationID string) bool

type PubKeyIdentity

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

func (*PubKeyIdentity) Verify

func (i *PubKeyIdentity) Verify(genericCandidate interface{}, base64ConversationID string) bool

Jump to

Keyboard shortcuts

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