ello-golang-customer-auth

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0

README

Ello Go Customer Authentication packages

Common packages for Ello customer authentication.

auth.Authenticator (interface)

The auth.Authenticator interface must be implemented by the different authenticators. It contains a CanAccept method to quickly check if the authenticator can handle a token, and the Authenticate method to return an authenticated auth.Customer from a token.

auth.Provider

auth.Provider can store multiple implementations of auth.Authenticator and returns the authenticator that should be used for a given token.

JWT

jwt.Authenticator

jwt.Authenticator is an implementation of auth.Authenticator used to parse JWTs. It supports multiple implementations of jwt.Authority as a map, with a string identifier as a key.

jwt.Authority (interface)

jwt.Authority is an interface to be implemented by different JWT Authorities. An authority must be able to provided a JWK from a valid kid (Key ID) and an implementation of jwt.CustomerClaims.

jwt.CustomerClaims (interface)

jwt.CustomerClaims is an interface for structs that JWT claims can be unmarshalled into and an authenticated auth.Customer can be returned as a result.

Auth0
auth0.Authority

auth0.Authority is an implementation of jwt.Authority for Auth0. It will load JKWSs from URLs and search through these for the provided kid.

auth0.customerClaims

auth0.customerClaims is an implementation of jwt.CustomerClaims for the custom claims of the customer within Auth0 JWTs.

Salesforce

salesforce.Authenticator

salesforce.Authenticator is an implementation of auth.Authenticator used to parse Salesforce tokens. The token is expected to be in the format <salesforce-user-id>:<salesforce-acess-token>, and if the credentials are correct the authenticated customer will be fetched from Salesforce and returned.

Directories

Path Synopsis
jwt

Jump to

Keyboard shortcuts

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