oauth

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package acl provides persistence and access to Access Control List

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertPruningJob

func InsertPruningJob(ctx context.Context) error

func NewDAO

func NewDAO(o dao.DAO) dao.DAO

Types

type DAO

type DAO interface {
	dao.DAO
	Load(accessToken string) (*auth.PersonalAccessToken, error)
	Store(accessToken string, token *auth.PersonalAccessToken, update bool) error
	Delete(patUuid string) error
	List(byType auth.PatType, byUser string) ([]*auth.PersonalAccessToken, error)
	PruneExpired() (int, error)
}

DAO interface

func NewMemDao

func NewMemDao() DAO

type MemDAO

type MemDAO struct {
	sql.DAO
	// contains filtered or unexported fields
}

MemDAO is a dev-util for storing tokens in memory

func (*MemDAO) Delete

func (m *MemDAO) Delete(patUuid string) error

func (*MemDAO) List

func (m *MemDAO) List(byType auth.PatType, byUser string) ([]*auth.PersonalAccessToken, error)

func (*MemDAO) Load

func (m *MemDAO) Load(accessToken string) (*auth.PersonalAccessToken, error)

func (*MemDAO) PruneExpired

func (m *MemDAO) PruneExpired() (int, error)

func (*MemDAO) Store

func (m *MemDAO) Store(accessToken string, token *auth.PersonalAccessToken, _ bool) error

type PruneTokensAction

type PruneTokensAction struct{}

func (*PruneTokensAction) GetDescription

func (c *PruneTokensAction) GetDescription(lang ...string) actions.ActionDescription

func (*PruneTokensAction) GetName

func (c *PruneTokensAction) GetName() string

Unique identifier

func (*PruneTokensAction) GetParametersForm

func (c *PruneTokensAction) GetParametersForm() *forms.Form

func (*PruneTokensAction) Init

func (c *PruneTokensAction) Init(job *jobs.Job, cl client.Client, action *jobs.Action) error

Pass parameters

func (*PruneTokensAction) Run

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 grpc spins an OpenID Connect Server using the coreos/dex implementation
Package grpc spins an OpenID Connect Server using the coreos/dex implementation

Jump to

Keyboard shortcuts

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