Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticateArgs ¶ added in v0.0.2
type AuthenticateArgs struct { Ctx map[interface{}]interface{} ClientID string ClientSecret string }
AuthenticateArgs for RPC.
type AuthenticateReply ¶ added in v0.0.2
AuthenticateReply for RPC.
type ConfigureArg ¶ added in v0.0.2
type ConfigureArg struct {
Ml map[string]interface{}
}
ConfigureArg for RPC.
type ConfigureReply ¶ added in v0.0.2
type ConfigureReply struct {
Err error
}
ConfigureReply for RPC.
type CredentialStrategy ¶
type CredentialStrategy interface { GetCredentials(w http.ResponseWriter, r *http.Request) (*Credentials, error) AddWWWAuthenticate(w http.ResponseWriter, r *http.Request, realm string) }
CredentialStrategy obtains Credentials from the request.
type Credentials ¶
Credentials contains the auth type, client id and secret.
type Manager ¶
type Manager interface { plugin.Plugin Authenticate(ctx context.Context, clientID, clientSecret string) (*user.User, map[string]*authpb.Scope, error) }
Manager is the interface to implement to authenticate users.
type ProviderPlugin ¶ added in v0.0.2
type ProviderPlugin struct {
Impl Manager
}
ProviderPlugin is the implementation of plugin.Plugin so we can serve/consume this.
type RPCClient ¶ added in v0.0.2
RPCClient is an implementation of Manager that talks over RPC.
type RPCServer ¶ added in v0.0.2
type RPCServer struct { // This is the real implementation Impl Manager }
RPCServer is the server that RPCClient talks to, conforming to the requirements of net/rpc.
func (*RPCServer) Authenticate ¶ added in v0.0.2
func (m *RPCServer) Authenticate(args AuthenticateArgs, resp *AuthenticateReply) error
Authenticate RPCServer Authenticate method.
func (*RPCServer) Configure ¶ added in v0.0.2
func (m *RPCServer) Configure(args ConfigureArg, resp *ConfigureReply) error
Configure RPCServer Configure method.
type Registry ¶
type Registry interface { ListProviders(ctx context.Context) ([]*registry.ProviderInfo, error) GetProvider(ctx context.Context, authType string) (*registry.ProviderInfo, error) }
Registry is the interface that auth registries implement for discovering auth providers.
type TokenStrategy ¶
TokenStrategy obtains a token from the request. If token does not exist returns an empty string.
type TokenWriter ¶
type TokenWriter interface {
WriteToken(token string, w http.ResponseWriter)
}
TokenWriter stores the token in a http response.
Directories ¶
Path | Synopsis |
---|---|
manager
|
|
nextcloud
Package nextcloud verifies a clientID and clientSecret against a Nextcloud backend.
|
Package nextcloud verifies a clientID and clientSecret against a Nextcloud backend. |
oidc
Package oidc verifies an OIDC token against the configured OIDC provider and obtains the necessary claims to obtain user information.
|
Package oidc verifies an OIDC token against the configured OIDC provider and obtains the necessary claims to obtain user information. |