tokenstore

package
v0.0.0-...-86bf689 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func V3InstallTokenProvider

func V3InstallTokenProvider(install uint64, appToken string) (string, time.Time, error)

Types

type InstallTokenProvider

type InstallTokenProvider func(install uint64, appToken string) (string, time.Time, error)

type InstallTokenService

type InstallTokenService struct {
	*TokenMessageStore
	keyservice.SigningService
	InstallTokenProvider
}

func (*InstallTokenService) GetInstallToken

GetInstallToken provices a valid install token for the requested installation. If a valid cached token is found, it will be returned, otherewise a new token will be be provisioned.

type ReceivedInvalidToken

type ReceivedInvalidToken struct {
	Token   string
	Message string
}

func (*ReceivedInvalidToken) Error

func (e *ReceivedInvalidToken) Error() string

type TokenMessageStore

type TokenMessageStore struct {
	messagestore.MessageStore
	tokenpb.Links
}

func NewTokenMessageStore

func NewTokenMessageStore(store messagestore.MessageStore, links *tokenpb.Links) *TokenMessageStore

func (*TokenMessageStore) AppTokenName

func (s *TokenMessageStore) AppTokenName(app uint64) (string, error)

func (*TokenMessageStore) DeleteAppToken

func (s *TokenMessageStore) DeleteAppToken(app uint64) (*messagestore.CacheMeta, error)

func (*TokenMessageStore) DeleteInstallToken

func (s *TokenMessageStore) DeleteInstallToken(app, install uint64) (*messagestore.CacheMeta, error)

func (*TokenMessageStore) GetAppToken

func (*TokenMessageStore) GetInstallToken

func (s *TokenMessageStore) GetInstallToken(app, install uint64) (*tokenpb.InstallToken, *messagestore.CacheMeta, error)

func (*TokenMessageStore) InstallTokenName

func (s *TokenMessageStore) InstallTokenName(app, install uint64) (string, error)

func (*TokenMessageStore) PutAppToken

func (s *TokenMessageStore) PutAppToken(token *tokenpb.AppToken) (*messagestore.CacheMeta, error)

func (*TokenMessageStore) PutInstallToken

func (s *TokenMessageStore) PutInstallToken(token *tokenpb.InstallToken) (*messagestore.CacheMeta, error)

type UnallowedAppId

type UnallowedAppId uint64

func (UnallowedAppId) Error

func (e UnallowedAppId) Error() string

type V3InstallTokenResp

type V3InstallTokenResp struct {
	Token     string `json:"token"`
	ExpiresAt string `json:"expires_at"`
}

Jump to

Keyboard shortcuts

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