Skip to content

Latest commit

 

History

History
executable file
·
35 lines (27 loc) · 1019 Bytes

README.md

File metadata and controls

executable file
·
35 lines (27 loc) · 1019 Bytes

AuthenticationApi

The AuthenticationApi uses MixerApi/JwtAuth. See plugins/AdminApi/src/Application.php for loading CakePHP authenticators and identifiers.

Getting a token

To get a JWT, browse to the Swagger UI http://localhost:8080/admin or directly via cURL:

curl -X 'POST' \
  'http://localhost:8080/admin/auth/login' \
  -H 'accept: text/plain' \
  -H 'Content-Type: application/json' \
  -H 'X-API-CLIENT: SWAGGER' \
  -d '{
  "email": "[email protected]",
  "password": "password"
}'

You can paste the token into Swagger UI by clicking the "Authorize" button at the top of page.

JWKS

MixerApi/JwtAuth supports both HMAC and RSA. This demo is configured to use RSA with JSON Web Key Set (JWKS). To retrieve you may use the Swagger UI or cURL:

curl -X 'GET' \
  'http://localhost:8080/admin/auth/keys' \
  -H 'accept: application/json' \
  -H 'X-API-CLIENT: SWAGGER'