keyring

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KeyRingServiceName = "com.xero.xoauth"

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyRingService

type KeyRingService interface {
	Set(item string, value string) error
	Get(item string) (string, error)
	Delete(item string) error
	SetTokens(item string, tokens oidc.TokenResultSet) error
	GetTokens(item string) (oidc.TokenResultSet, error)
	DeleteTokens(item string) error
}

func NewKeyRingService

func NewKeyRingService(debug bool, runtimeName string) (*KeyRingService, error)

func NewUnixKeyRingService

func NewUnixKeyRingService(debug bool) (KeyRingService, error)

func NewWindowsKeyRingService

func NewWindowsKeyRingService(debug bool) (KeyRingService, error)

type UnixKeyRingService

type UnixKeyRingService struct {
}

func (UnixKeyRingService) Delete

func (service UnixKeyRingService) Delete(item string) error

func (UnixKeyRingService) DeleteTokens

func (service UnixKeyRingService) DeleteTokens(item string) error

func (UnixKeyRingService) Get

func (service UnixKeyRingService) Get(item string) (string, error)

func (UnixKeyRingService) GetTokens

func (service UnixKeyRingService) GetTokens(item string) (oidc.TokenResultSet, error)

func (UnixKeyRingService) Set

func (service UnixKeyRingService) Set(item string, value string) error

func (UnixKeyRingService) SetTokens

func (service UnixKeyRingService) SetTokens(item string, tokens oidc.TokenResultSet) error

type WindowsKeyRingService

type WindowsKeyRingService struct {
}

func (WindowsKeyRingService) Delete

func (service WindowsKeyRingService) Delete(item string) error

func (WindowsKeyRingService) DeleteTokens

func (service WindowsKeyRingService) DeleteTokens(item string) error

func (WindowsKeyRingService) Get

func (service WindowsKeyRingService) Get(item string) (string, error)

func (WindowsKeyRingService) GetTokens

func (service WindowsKeyRingService) GetTokens(item string) (oidc.TokenResultSet, error)

Windows Cred store 2.5kb limit requires us to reassemble the token set

func (WindowsKeyRingService) Set

func (service WindowsKeyRingService) Set(item string, value string) error

func (WindowsKeyRingService) SetTokens

func (service WindowsKeyRingService) SetTokens(item string, tokens oidc.TokenResultSet) error

WinCreds only allows for maximum of 2.5kb in any one field. Here, we split the tokenset into its parts, and save them all separately.

Jump to

Keyboard shortcuts

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