Identity Provider
HMAC signed tokens
For testing JWT based authentication and authorisation go run main.go
can be used to generate a token with with sample claims:
{
"name": "Go Invoicer",
"admin": true,
"sub": "f8c39a31-9ced-4761-8a33-b9c628a67510"
}
together with HMACKeyFunc
../rest/auth.go that verifies the token.
Identity Provider Service
This MVP uses FusionAuth to provide an external service for user identity handling and token signing.
To launch the service follow these steps:
make identityprovider-up
- Go to http://localhost:9011/ and complete the setup-wizard.
- Create API key named "Invoice MVP" at http://localhost:9011/admin/api/
- Copy the API key id.
- Edit the makefile and replace the exported API_KEY with key from step 4.
- Bootstrap Identity Provider config by running through the makefile targets in the "Auth Bootstrapping" section.
- Finally: run
make test
to execute unit & integration tests.