package
0.0.0-20220116124430-3492e0ae15bf
Repository: https://github.com/hozalex/knox.git
Documentation: pkg.go.dev
# Functions
GetURINamesFromExtensions retrieves URIs from the SAN extension of a slice of extensions.
IsService returns true if the principal, or first principal in the case of mux, is a service.
IsUser returns true if the principal, or first principal in the case of mux, is a user.
MockGitHubProvider returns a mocked out authentication header with a simple mock "server".
NewGitHubProvider initializes GitHubProvider with an HTTP client with a timeout.
NewMachine creates a machine principal with the given auth Provider.
NewMTLSAuthProvider initializes a chain of trust with given CA certificates.
NewService creates a service principal with the given auth Provider.
NewSpiffeAuthFallbackProvider initializes a chain of trust with given CA certificates, identical to the SpiffeProvider except the Type is defined as the MTLSAuthProvider Type().
NewSpiffeAuthProvider initializes a chain of trust with given CA certificates, identical to the MTLS provider except the principal is a Spiffe ID instead of a hostname and the CN of the cert is ignored.
NewUser creates a user principal with the given auth Provider.
# Structs
GitHubLoginFormat specifies the json return format for /user field.
GitHubProvider implements user authentication through github.com.
MTLSAuthProvider does authentication by verifying TLS certs against a collection of root CAs.
SpiffeFallbackProvider is a SpiffeProvider that uses the same Type byte as the MTLSAuthProvider.
SpiffeProvider does authentication by verifying TLS certs against a collection of root CAs.
# Interfaces
Provider is used for authenticating requests via the authentication decorator.
# Type aliases
GitHubOrgFormat specifies the JSON return format for /user/org.