Authenticate using JWT Authenticator
This topic describes the JWT Authenticator REST API.
Use the JWT Authenticator API to send an authentication request from the application with a JWT to Conjur.
For more information about the JWT Authenticator, see JWT Authentication.
URI
|
URI Parameters
service-id |
The service ID of your JWT Authenticator webservice, for example myVendor. Required: Yes |
account |
The organization's Conjur account name. Required: Yes |
host-id |
The identity of the application ( This value should be the full name of the Required: Required if the JWT Authenticator is defined without a |
Example URL
-
JWT Authenticator with
token-app-property
variable (nohost-id
):https://myorg.example.com/authn-jwt/myVendor/cucumber/authenticate
-
JWT Authenticator without
token-app-property
variable - must include thehost-id
:https://myorg.example.com/authn-jwt/myVendor/cucumber/host%2Fjwt-apps%2Fmyapp/authenticate
Request
Header |
|
||
Body |
The body must include the JWT:
|
Example REST request
-
Request with
token-app-property
:curl -k --request POST 'https://myorg.example.com/authn-jwt/myVendor/cucumber/authenticate' --header 'Content-Type: application/x-www-form-urlencoded' --header "Accept-Encoding: base64" --data-urlencode 'jwt=eyJ0e......jjjkl'
-
Request without
token-app-property
:curl -k --request POST 'https://myorg.example.com/authn-jwt/myVendor/cucumber/host%2Fjwt-apps%2Fmyapp/authenticate' --header 'Content-Type: application/x-www-form-urlencoded' --header "Accept-Encoding: base64" --data-urlencode 'jwt=eyJ0e......jjjkl'
Response
Code |
Description |
---|---|
200 |
The response body is the access token |
400 |
Bad request. Check that the body is correct. |
401 |
The request lacks valid authentication credentials |
Response 200 example
Header
|
Body
Returns a base 64 access token of the host whose JWT is provided in the input:
|
For more information about using the access token, see Authenticate.