A simple client package for ASAP authentication.
go get github.com/jasonfriedland/asap
ASAP_PRIVATE_KEY=data:application/pkcs8;kid=webapp%2Fabc123;base64,...
ASAP_ISSUER=services/webapp
ASAP_AUDIENCE=webapp,webapp-service
Ensure the relevant environment variables are set. Then:
import "github.com/jasonfriedland/asap"
client, _ := asap.NewClient()
token, _ := client.AuthToken()
fmt.Printf("Bearer %s", token)