db

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDirPath = ".xoauth"
View Source
const ConfigFileName = "xoauth.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialStore

type CredentialStore struct {
	KeyRingService keyring.KeyRingService
}

func NewCredentialStore

func NewCredentialStore(ring *keyring.KeyRingService) *CredentialStore

func (*CredentialStore) ClientExists

func (store *CredentialStore) ClientExists(name string) (bool, error)

func (*CredentialStore) DeleteClient

func (store *CredentialStore) DeleteClient(clientName string) (bool, error)

func (*CredentialStore) DeleteClientSecret

func (store *CredentialStore) DeleteClientSecret(clientName string) (bool, error)

func (*CredentialStore) DeleteTokens

func (store *CredentialStore) DeleteTokens(clientName string) error

func (*CredentialStore) EnsureDbExists

func (store *CredentialStore) EnsureDbExists() error

func (*CredentialStore) GetClientWithSecret

func (store *CredentialStore) GetClientWithSecret(allClients map[string]OidcClient, name string) (OidcClient, error)

func (*CredentialStore) GetClientWithoutSecret

func (store *CredentialStore) GetClientWithoutSecret(allClients map[string]OidcClient, name string) (OidcClient, error)

func (*CredentialStore) GetClients

func (store *CredentialStore) GetClients() (map[string]OidcClient, error)

func (*CredentialStore) GetTokens

func (store *CredentialStore) GetTokens(clientName string) (oidc.TokenResultSet, error)

func (*CredentialStore) SaveClientMetadata

func (store *CredentialStore) SaveClientMetadata(client OidcClient) (bool, error)

func (*CredentialStore) SaveClientWithSecret

func (store *CredentialStore) SaveClientWithSecret(client OidcClient, secret string) (bool, error)

func (*CredentialStore) SaveTokens

func (store *CredentialStore) SaveTokens(clientName string, tokenSet oidc.TokenResultSet) (bool, error)

func (*CredentialStore) SetClientSecret

func (store *CredentialStore) SetClientSecret(clientName string, secret string) (bool, error)

type OidcClient

type OidcClient struct {
	Authority    string
	Alias        string
	GrantType    string
	ClientId     string
	ClientSecret string
	CreatedDate  time.Time
	Scopes       []string
}

Jump to

Keyboard shortcuts

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