Documentation ¶
Overview ¶
Package oauth provides OAuth service
Index ¶
- func NewDAO(ctx context.Context, o dao.DAO) (dao.DAO, error)
- type DAO
- type MemDAO
- func (m *MemDAO) Delete(patUuid string) error
- func (m *MemDAO) List(byType auth.PatType, byUser string) ([]*auth.PersonalAccessToken, error)
- func (m *MemDAO) Load(accessToken string) (*auth.PersonalAccessToken, error)
- func (m *MemDAO) PruneExpired() (int, error)
- func (m *MemDAO) Store(accessToken string, token *auth.PersonalAccessToken, _ bool) error
- type PruneTokensAction
- func (c *PruneTokensAction) GetDescription(lang ...string) actions.ActionDescription
- func (c *PruneTokensAction) GetName() string
- func (c *PruneTokensAction) GetParametersForm() *forms.Form
- func (c *PruneTokensAction) Init(job *jobs.Job, action *jobs.Action) error
- func (c *PruneTokensAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (*jobs.ActionMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DAO ¶
type DAO interface { dao.DAO // Load finds a corresponding, non-expired PAT based on the AccessToken. Load(accessToken string) (*auth.PersonalAccessToken, error) // Store inserts a PAT in the storage. Store(accessToken string, token *auth.PersonalAccessToken, update bool) error // Delete removes a PAT by its UUID. Delete(patUuid string) error // List lists all known PAT with optional filters. List(byType auth.PatType, byUser string) ([]*auth.PersonalAccessToken, error) // PruneExpired removes expired PAT from the storage. PruneExpired() (int, error) }
DAO interface
type MemDAO ¶
MemDAO is a dev-util for storing tokens in memory
func (*MemDAO) PruneExpired ¶
type PruneTokensAction ¶
type PruneTokensAction struct {
common.RuntimeHolder
}
func (*PruneTokensAction) GetDescription ¶
func (c *PruneTokensAction) GetDescription(lang ...string) actions.ActionDescription
func (*PruneTokensAction) GetName ¶
func (c *PruneTokensAction) GetName() string
GetName Unique identifier
func (*PruneTokensAction) GetParametersForm ¶
func (c *PruneTokensAction) GetParametersForm() *forms.Form
func (*PruneTokensAction) Run ¶
func (c *PruneTokensAction) Run(ctx context.Context, channels *actions.RunnableChannels, input *jobs.ActionMessage) (*jobs.ActionMessage, error)
Run the actual action code
Directories ¶
Path | Synopsis |
---|---|
Package grpc spins an OpenID Connect Server using the coreos/dex implementation
|
Package grpc spins an OpenID Connect Server using the coreos/dex implementation |
Package lang provides auth-related i18n strings
|
Package lang provides auth-related i18n strings |
Package rest provides access to the TokenServiceApi
|
Package rest provides access to the TokenServiceApi |
Package web spins an OpenID Connect Server using the coreos/dex implementation
|
Package web spins an OpenID Connect Server using the coreos/dex implementation |
Click to show internal directories.
Click to hide internal directories.