auth

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 20 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) Run

func (cmd *AuthorizeCommand) Run(ctx server.Cmd) error

type CreateGroupCommand

type CreateGroupCommand struct {
	GetGroupCommand
	schema.GroupMeta
}

func (*CreateGroupCommand) Run

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

type DeleteGroupCommand

type DeleteGroupCommand struct {
	GetGroupCommand
}

func (*DeleteGroupCommand) Run

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

type DeleteUserCommand

type DeleteUserCommand struct {
	GetUserCommand
}

func (*DeleteUserCommand) Run

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

type DiscoverCommand

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

func (*DiscoverCommand) Run

func (cmd *DiscoverCommand) Run(ctx server.Cmd) error

type GetGroupCommand

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

func (*GetGroupCommand) Run

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

type GetUserCommand

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

func (*GetUserCommand) Run

func (cmd *GetUserCommand) Run(ctx 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(ctx server.Cmd) error

type LeaveGroupsCommand

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

func (*LeaveGroupsCommand) Run

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

type ListGroupsCommand

type ListGroupsCommand struct {
	schema.GroupListRequest
}

func (*ListGroupsCommand) Run

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

type ListProvidersCommand

type ListProvidersCommand struct{}

func (*ListProvidersCommand) Run

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

type ListScopesCommand

type ListScopesCommand struct {
	schema.ScopeListRequest
}

func (*ListScopesCommand) Run

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

type ListUsersCommand

type ListUsersCommand struct {
	schema.UserListRequest
}

func (*ListUsersCommand) Run

func (cmd *ListUsersCommand) Run(ctx 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 */
	ClientID     string `name:"client-id" help:"OAuth client ID. Defaults to the stored client ID for the issuer."`
	ClientSecret string `` /* 131-byte string literal not displayed */
}

func (*RefreshCommand) Run

func (cmd *RefreshCommand) Run(ctx server.Cmd) error

type RevokeCommand

type RevokeCommand struct {
	Endpoint     string `` /* 138-byte string literal not displayed */
	ClientID     string `name:"client-id" help:"OAuth client ID. Defaults to the stored client ID for the issuer."`
	ClientSecret string `` /* 131-byte string literal not displayed */
}

func (*RevokeCommand) Run

func (cmd *RevokeCommand) Run(ctx server.Cmd) error

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(ctx server.Cmd) error

type UpdateUserCommand

type UpdateUserCommand struct {
	GetUserCommand
	schema.UserMeta
}

func (*UpdateUserCommand) Run

func (cmd *UpdateUserCommand) Run(ctx 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 */
	ClientID     string `name:"client-id" help:"OAuth client ID. Defaults to the stored client ID for the issuer when a refresh is needed."`
	ClientSecret string `` /* 126-byte string literal not displayed */
}

func (*UserInfoCommand) Run

func (cmd *UserInfoCommand) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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