Documentation ¶
Index ¶
- Constants
- func MakeCertificates(key ssh.PublicKey, actx *AuthContext, validBefore time.Time, ...) []*ssh.Certificate
- type AuthContext
- func (ac *AuthContext) GetAuthMeta() map[string]interface{}
- func (ac *AuthContext) GetAuthenticators() []string
- func (ac *AuthContext) GetAuthorizers() []string
- func (ac *AuthContext) GetCriticalOptions() map[string]string
- func (ac *AuthContext) GetExtensions() map[string]string
- func (ac *AuthContext) GetMetaString(k string) string
- func (ac *AuthContext) GetParent() *AuthContext
- func (ac *AuthContext) GetPrincipals() []string
- func (ac *AuthContext) GetSubjectName() string
- func (ac *AuthContext) IsValid() bool
- func (ac *AuthContext) Len() int
- type Authenticator
- type Authorizer
- type Credentials
- type FederatedAuthenticator
Constants ¶
View Source
const ( CredentialUserPassword = "user_password" CredentialPin = "pin" CredentialFederated = "federated" MetaAuditID = "audit_id" MetaFederationAuthURL = "federation_auth_url" )
View Source
const ( StatusPending int = iota StatusCompleted )
Variables ¶
This section is empty.
Functions ¶
func MakeCertificates ¶
func MakeCertificates(key ssh.PublicKey, actx *AuthContext, validBefore time.Time, maxPrincipalsPerCert int) []*ssh.Certificate
Types ¶
type AuthContext ¶
type AuthContext struct { Parent *AuthContext Status int SubjectName string Principals []string RemovePrincipals []string CriticalOptions map[string]string Extensions map[string]string Authenticator string Authorizer string AuthMeta map[string]interface{} }
func (*AuthContext) GetAuthMeta ¶
func (ac *AuthContext) GetAuthMeta() map[string]interface{}
func (*AuthContext) GetAuthenticators ¶
func (ac *AuthContext) GetAuthenticators() []string
func (*AuthContext) GetAuthorizers ¶
func (ac *AuthContext) GetAuthorizers() []string
func (*AuthContext) GetCriticalOptions ¶
func (ac *AuthContext) GetCriticalOptions() map[string]string
func (*AuthContext) GetExtensions ¶
func (ac *AuthContext) GetExtensions() map[string]string
func (*AuthContext) GetMetaString ¶
func (ac *AuthContext) GetMetaString(k string) string
func (*AuthContext) GetParent ¶
func (ac *AuthContext) GetParent() *AuthContext
func (*AuthContext) GetPrincipals ¶
func (ac *AuthContext) GetPrincipals() []string
func (*AuthContext) GetSubjectName ¶
func (ac *AuthContext) GetSubjectName() string
func (*AuthContext) IsValid ¶
func (ac *AuthContext) IsValid() bool
Verify the whole auth context chain
type Authenticator ¶
type Authenticator interface { Authenticate(parentctx *AuthContext, creds *Credentials) (newctx *AuthContext, success bool) Type() string Name() string Realm() string CredentialType() string }
type Authorizer ¶
type Authorizer interface { Authorize(parentctx *AuthContext) (newctx *AuthContext, success bool) Name() string Description() string }
type Credentials ¶
type FederatedAuthenticator ¶
type FederatedAuthenticator interface { Authenticator FederationCallback(data interface{}) error }
For OAuth2 type authenticators
Click to show internal directories.
Click to hide internal directories.