Documentation
¶
Index ¶
- func BearerAuth(r *http.Request) (bearer string, ok bool)
- func DefaultIdentitiesFileNames(user *unix_util.User) []string
- func HandleAuths(ctx context.Context, enablePasswordLogin bool, defaultMaxPacketSize uint64, ...) (http.HandlerFunc, error)
- func HandleBasicAuth(handlerFunc ssh3.AuthenticatedHandlerFunc, conv *ssh3.Conversation) http.HandlerFunc
- func HandleBearerAuth(username string, base64ConversationID string, ...) http.HandlerFunc
- func HandleJWTAuth(username string, newConv *ssh3.Conversation, identities []IdentityVerifier, ...) ssh3.UnauthenticatedBearerFunc
- func ParseBearerAuth(auth string) (bearer string, ok bool)
- type IdentityVerifier
- type OpenIDConnectIdentity
- type WrappedPluginVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerAuth ¶
BearerAuth returns the bearer token Authorization header, if the request uses HTTP Basic Authentication. See RFC 2617, Section 2.
func HandleAuths ¶
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, identities []IdentityVerifier, handlerFunc ssh3.AuthenticatedHandlerFunc) ssh3.UnauthenticatedBearerFunc
currently only supports RS256 and EdDSA signing algorithms
func ParseBearerAuth ¶
ParseBearerAuth parses an HTTP Bearer Authentication string.
Types ¶
type IdentityVerifier ¶
type IdentityVerifier interface {
// returns whether the provided candidate contains a sufficient proof to
// be considered as equivalent to this identity
Verify(candidate interface{}, base64ConversationID string) bool
}
func GetAuthorizedIdentities ¶
func GetAuthorizedIdentities(user *unix_util.User) ([]IdentityVerifier, error)
func ParseIdentity ¶
func ParseIdentity(user *unix_util.User, identityStr string) (ret []IdentityVerifier, err error)
type OpenIDConnectIdentity ¶
type OpenIDConnectIdentity struct {
// contains filtered or unexported fields
}
func (*OpenIDConnectIdentity) Verify ¶
func (i *OpenIDConnectIdentity) Verify(genericCandidate interface{}, base64ConversationID string) bool
type WrappedPluginVerifier ¶
type WrappedPluginVerifier struct {
auth.RequestIdentityVerifier
}
func (*WrappedPluginVerifier) Verify ¶
func (w *WrappedPluginVerifier) Verify(genericCandidate interface{}, base64ConversationID string) bool
Click to show internal directories.
Click to hide internal directories.