auth

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCommands

type AuthCommands struct {
	Authorize AuthorizeCommand `cmd:"" help:"Authorize to a provider and save the resulting token for future use." group:"AUTH"`
	Refresh   RefreshCommand   `cmd:"" help:"Refresh a stored OAuth token for an endpoint." group:"AUTH"`
	Revoke    RevokeCommand    `cmd:"" help:"Revoke and remove a stored OAuth token for an endpoint." group:"AUTH"`
	UserInfo  UserInfoCommand  `cmd:"" name:"userinfo" help:"Fetch userinfo using the stored OAuth token for an endpoint." group:"AUTH"`
	Discover  DiscoverCommand  `cmd:"" help:"Discover the authorization metadata for an endpoint." group:"AUTH"`
}

type AuthorizeCommand

type AuthorizeCommand struct {
	Endpoint     string   `` /* 138-byte string literal not displayed */
	Provider     string   `name:"provider" help:"Provider hint to pass to the authorization endpoint when multiple providers are configured."`
	ClientID     string   `name:"client-id" help:"OAuth client ID. Defaults to the stored client ID."`
	ClientSecret string   `name:"client-secret" help:"OAuth client secret. Defaults to the stored client secret when required by the provider."`
	Redirect     string   `` /* 169-byte string literal not displayed */
	Scopes       []string `` /* 148-byte string literal not displayed */
}

func (AuthorizeCommand) RedactedString added in v0.0.7

func (cmd AuthorizeCommand) RedactedString() string

func (*AuthorizeCommand) Run

func (cmd *AuthorizeCommand) Run(globals server.Cmd) (err error)

type CreateGroupCommand

type CreateGroupCommand struct {
	GetGroupCommand
	schema.GroupMeta
}

func (*CreateGroupCommand) Run

func (cmd *CreateGroupCommand) Run(globals server.Cmd) error

type CreateKeyCommand added in v0.0.8

type CreateKeyCommand struct {
	schema.KeyMeta
}

func (*CreateKeyCommand) Run added in v0.0.8

func (cmd *CreateKeyCommand) Run(globals server.Cmd) error

type DeleteGroupCommand

type DeleteGroupCommand struct {
	GetGroupCommand
}

func (*DeleteGroupCommand) Run

func (cmd *DeleteGroupCommand) Run(globals server.Cmd) error

type DeleteKeyCommand added in v0.0.9

type DeleteKeyCommand struct {
	GetKeyCommand
}

func (*DeleteKeyCommand) Run added in v0.0.9

func (cmd *DeleteKeyCommand) Run(globals server.Cmd) error

type DeleteUserCommand

type DeleteUserCommand struct {
	GetUserCommand
}

func (*DeleteUserCommand) Run

func (cmd *DeleteUserCommand) Run(globals server.Cmd) error

type DiscoverCommand

type DiscoverCommand struct {
	Endpoint string `` /* 138-byte string literal not displayed */
}

func (*DiscoverCommand) Run

func (cmd *DiscoverCommand) Run(globals server.Cmd) (err error)

type GetGroupCommand

type GetGroupCommand struct {
	Group string `arg:"" name:"group" help:"Group identifier"`
}

func (*GetGroupCommand) Run

func (cmd *GetGroupCommand) Run(globals server.Cmd) error

type GetKeyCommand added in v0.0.9

type GetKeyCommand struct {
	ID schema.KeyID `arg:"" name:"key" help:"API key UUID"`
}

func (*GetKeyCommand) Run added in v0.0.9

func (cmd *GetKeyCommand) Run(globals server.Cmd) error

type GetUserCommand

type GetUserCommand struct {
	ID schema.UserID `arg:"" name:"user" help:"User UUID"`
}

func (*GetUserCommand) Run

func (cmd *GetUserCommand) Run(globals server.Cmd) error

type GroupCommands

type GroupCommands struct {
	Groups      ListGroupsCommand  `cmd:"" name:"groups" help:"Get Groups." group:"AUTH MANAGER"`
	Group       GetGroupCommand    `cmd:"" name:"group" help:"Get Group." group:"AUTH MANAGER"`
	CreateGroup CreateGroupCommand `cmd:"" name:"group-create" help:"Create Group." group:"AUTH MANAGER"`
	UpdateGroup UpdateGroupCommand `cmd:"" name:"group-update" help:"Update Group." group:"AUTH MANAGER"`
	DeleteGroup DeleteGroupCommand `cmd:"" name:"group-delete" help:"Delete Group." group:"AUTH MANAGER"`
}

type JoinGroupsCommand

type JoinGroupsCommand struct {
	GetUserCommand
	Groups []string `arg:"" name:"groups" help:"Groups to add user to."`
}

func (*JoinGroupsCommand) Run

func (cmd *JoinGroupsCommand) Run(globals server.Cmd) error

type KeyCommands added in v0.0.8

type KeyCommands struct {
	Keys      ListKeysCommand  `cmd:"" name:"keys" help:"Get API keys." group:"AUTH MANAGER"`
	Key       GetKeyCommand    `cmd:"" name:"key" help:"Get API key." group:"AUTH MANAGER"`
	CreateKey CreateKeyCommand `cmd:"" name:"key-create" help:"Create API key." group:"AUTH MANAGER"`
	UpdateKey UpdateKeyCommand `cmd:"" name:"key-update" help:"Update API key." group:"AUTH MANAGER"`
	DeleteKey DeleteKeyCommand `cmd:"" name:"key-delete" help:"Delete API key." group:"AUTH MANAGER"`
}

type LeaveGroupsCommand

type LeaveGroupsCommand struct {
	GetUserCommand
	Groups []string `arg:"" name:"groups" help:"Groups to remove user from."`
}

func (*LeaveGroupsCommand) Run

func (cmd *LeaveGroupsCommand) Run(globals server.Cmd) error

type ListGroupsCommand

type ListGroupsCommand struct {
	schema.GroupListRequest
}

func (*ListGroupsCommand) Run

func (cmd *ListGroupsCommand) Run(globals server.Cmd) error

type ListKeysCommand added in v0.0.9

type ListKeysCommand struct {
	schema.KeyListRequest
}

func (*ListKeysCommand) Run added in v0.0.9

func (cmd *ListKeysCommand) Run(globals server.Cmd) error

type ListProvidersCommand

type ListProvidersCommand struct{}

func (*ListProvidersCommand) Run

func (cmd *ListProvidersCommand) Run(globals server.Cmd) error

type ListScopesCommand

type ListScopesCommand struct {
	schema.ScopeListRequest
}

func (*ListScopesCommand) Run

func (cmd *ListScopesCommand) Run(globals server.Cmd) error

type ListUsersCommand

type ListUsersCommand struct {
	schema.UserListRequest
}

func (*ListUsersCommand) Run

func (cmd *ListUsersCommand) Run(globals server.Cmd) error

type ProviderCommands

type ProviderCommands struct {
	Providers ListProvidersCommand `cmd:"" name:"providers" help:"Get Providers." group:"AUTH MANAGER"`
}

type RefreshCommand

type RefreshCommand struct {
	Endpoint string `` /* 138-byte string literal not displayed */
}

func (*RefreshCommand) Run

func (cmd *RefreshCommand) Run(globals server.Cmd) (err error)

type RevokeCommand

type RevokeCommand struct {
	Endpoint string `` /* 138-byte string literal not displayed */
}

func (RevokeCommand) RedactedString added in v0.0.7

func (cmd RevokeCommand) RedactedString() string

func (*RevokeCommand) Run

func (cmd *RevokeCommand) Run(globals server.Cmd) (err error)

func (RevokeCommand) String added in v0.0.7

func (cmd RevokeCommand) String() string

type ScopeCommands

type ScopeCommands struct {
	Scopes ListScopesCommand `cmd:"" name:"scopes" help:"Get Scopes." group:"AUTH MANAGER"`
}

type TokenStore

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

func NewTokenStore

func NewTokenStore(ctx server.Cmd) *TokenStore

func (*TokenStore) StoreToken

func (s *TokenStore) StoreToken(endpoint, issuer string, token *oauth2.Token) error

func (*TokenStore) Token

func (s *TokenStore) Token(endpoint string) (*oauth2.Token, string, error)

type UpdateGroupCommand

type UpdateGroupCommand struct {
	GetGroupCommand
	schema.GroupMeta
}

func (*UpdateGroupCommand) Run

func (cmd *UpdateGroupCommand) Run(globals server.Cmd) error

type UpdateKeyCommand added in v0.0.9

type UpdateKeyCommand struct {
	GetKeyCommand
	schema.KeyMeta
	NoExpiresAt bool `name:"no-expires-at" help:"Remove the key expiry instead of setting one."`
}

func (*UpdateKeyCommand) Run added in v0.0.9

func (cmd *UpdateKeyCommand) Run(globals server.Cmd) error

type UpdateUserCommand

type UpdateUserCommand struct {
	GetUserCommand
	schema.UserMeta
	NoExpiresAt bool `name:"no-expires-at" help:"Remove the user expiry instead of setting one."`
}

func (*UpdateUserCommand) Run

func (cmd *UpdateUserCommand) Run(globals server.Cmd) error

type UserCommands

type UserCommands struct {
	Users       ListUsersCommand   `cmd:"" name:"users" help:"Get Users." group:"AUTH MANAGER"`
	User        GetUserCommand     `cmd:"" name:"user" help:"Get User." group:"AUTH MANAGER"`
	UpdateUser  UpdateUserCommand  `cmd:"" name:"user-update" help:"Update User." group:"AUTH MANAGER"`
	DeleteUser  DeleteUserCommand  `cmd:"" name:"user-delete" help:"Delete User." group:"AUTH MANAGER"`
	JoinGroups  JoinGroupsCommand  `cmd:"" name:"user-join" help:"Add user to groups." group:"AUTH MANAGER"`
	LeaveGroups LeaveGroupsCommand `cmd:"" name:"user-leave" help:"Remove user from groups." group:"AUTH MANAGER"`
}

type UserInfoCommand

type UserInfoCommand struct {
	Endpoint string `` /* 138-byte string literal not displayed */
}

func (*UserInfoCommand) Run

func (cmd *UserInfoCommand) Run(globals server.Cmd) (err error)

Jump to

Keyboard shortcuts

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