I’m not able to generate jwt and it’s throwing a 404 not found error. Here are spec, policies that I have configured. Please let me know if there is anything wrong in the configuration.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="Assign-Message-2">
<DisplayName>Assign Message-2</DisplayName>
<Properties/>
<Copy source="request">
<Headers/>
<QueryParams/>
<FormParams/>
<Payload/>
<Verb/>
<StatusCode/>
<ReasonPhrase/>
<Path/>
</Copy>
<Remove>
<Headers>
<Header name="jwt-token"> {jwt-variable}</Header>
</Headers>
<QueryParams>
<QueryParam name="q1"/>
</QueryParams>
<FormParams>
<FormParam name="f1"/>
</FormParams>
<Payload/>
</Remove>
<Add>
<Headers/>
<QueryParams/>
<FormParams/>
</Add>
<Set>
<Headers/>
<QueryParams/>
<FormParams/>
<!-- <Verb>GET</Verb> -->
<Path/>
</Set>
<AssignVariable>
<Name>name</Name>
<Value/>
<Ref/>
</AssignVariable>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</AssignMessage>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="Assign-Message-1">
<DisplayName>Assign Message-1</DisplayName>
<AssignVariable>
<Name>private.key</Name>
<Value> secret123</Value>
</AssignVariable>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</AssignMessage>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateJWT async="false" continueOnError="false" enabled="true" name="Generate-JWT-1">
<DisplayName>Generate JWT-1</DisplayName>
<Algorithm>HS256</Algorithm>
<SecretKey>
<Value ref="private.key"/>
</SecretKey>
<Subject>subject-subject</Subject>
<Issuer>urn://apigee-edge-JWT-policy-test</Issuer>
<Audience>audience1,audience2</Audience>
<ExpiresIn>8h</ExpiresIn>
<AdditionalClaims>
<Claim name="additional-claim-name" type="string">additional-claim-value-goes-here</Claim>
</AdditionalClaims>
<OutputVariable>jwt-variable</OutputVariable>
</GenerateJWT>
# Example YAML to get you started quickly.
# Be aware that YAML has indentation based coping.
# Code completion support is available so start typing for available options.
swagger: '2.0'
# This is your document metadata
info:
version: "0.0.1"
title: Example Title
description: |
A brief description of the API.
It can be multiple lines.
host:
people.apigee.io
schemes:
- https
- http
# Describe your paths here
paths:
# This is a path endpoint. Change it.
/generate_jwt:
get:
summary: generates a jwt
description: generates a jwt
responses:
200:
description: OK
/verify_jwt:
get:
summary: verify the jwt
description: verify the jwt
responses:
200:
description: OK