Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct { AccessToken string ExpiryTime time.Time ExpiresIn int64 // ExpiresIn is the number of seconds before access token expires }
Authentication is generated open successful authentication
type Claims ¶
type Claims struct { Owners map[string]string `json:"owners,omitempty"` Scopes string `json:"scopes"` }
Claims custom to DPhoto used for authorisation
type Config ¶
type Config struct { TrustedIssuers map[string]IssuerOAuth2Config // TrustedIssuers is the list of accepted 'iss', and their public key Issuer string // Issuer is user in the generated JWT for both 'iss' and 'aud' ValidityDuration string // ValidityDuration uses time.ParseDuration format (ex: '8h') SecretJwtKey []byte // SecretJwtKey is the key used to sign and validate DPhoto JWT }
type IssuerOAuth2Config ¶
type IssuerOAuth2Config struct { ConfigSource string PublicKeysLookup func(method TokenMethod) (interface{}, error) }
func (*IssuerOAuth2Config) String ¶
func (i *IssuerOAuth2Config) String() string
type TokenMethod ¶
func (*TokenMethod) String ¶
func (t *TokenMethod) String() string
type UserRepository ¶
Click to show internal directories.
Click to hide internal directories.