To access the REST services listing swagger resource without having to enter the JWT beforehand, the jwtSwaggerURI property needs to be set with the aforementioned resource URI.
Example:
If the listing resource access URL is: http://my.domain.com/<RootContext>/<CXFServlet>/swagger.json, the URI to enter for thejwtSwaggerURI property is: /<CxfServlet>/swagger.json
(for example: /ws/swagger.json)
If the listing resource access URL is: http://my.domain.com/<RootContext>/<CxfServlet>/api-docs?url=/<RootContext>/<CxfServlet>/swagger.json, the URI to enter for the jwtSwaggerURI property is: /<CxfServlet>/api-docs;/<CxfServlet>/swagger*
(for example: /ws/api-docs;/ws/swagger*)
The swagger-ui [api_key] field may contain a JWT so that an Authorization header can be added to all the requests sent to the resource server.
Example:
Entering the following string into the swagger-ui field [api_key] (or jwtKey [apiKey]):
JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJoYXJkaXMiLCJpc3MiOiJKV1RQcm92aWRlciIsImlhdCI6MTQ2Mz
adds the following HTTP header to all requests sent to the resource server:
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJoYXJkaXMiLCJpc3MiOiJKV1RQcm92aWRlciIsImlhd
|
NB: "JWT" is the default authentication scheme. If the jwtAuthSchemeproperty of the JwtTokenConfiguration object requires another scheme, the string entered in the [api_key] field must be adjusted accordingly.