Add account issuers

This commit is contained in:
Ben Toogood
2020-05-21 16:41:55 +01:00
parent 856c73b341
commit 12061bd006
12 changed files with 159 additions and 228 deletions

View File

@@ -17,7 +17,7 @@ var (
ErrForbidden = errors.New("resource forbidden")
)
// Auth providers authentication and authorization
// Auth provides authentication and authorization
type Auth interface {
// Init the auth
Init(opts ...Option)
@@ -47,8 +47,8 @@ type Account struct {
ID string `json:"id"`
// Type of the account, e.g. service
Type string `json:"type"`
// Provider who issued the account
Provider string `json:"provider"`
// Issuer of the account
Issuer string `json:"issuer"`
// Any other associated metadata
Metadata map[string]string `json:"metadata"`
// Scopes the account has access to