I wanted to know if it is possible to connect to an external database or service from the CustomGatewayJWTGenerator https://github.com/wso2/samples-apim/blob/master/CustomGatewayJWTGenerator/src/main/java/org/wso2/carbon/test/CustomGatewayJWTGenerator.java
Can we propagate ENV variables to the class, for example with the url of the service to invoke? How to know the service to invoke (depending if sandbox or production)?
Additionaly, is there anyway to access the OAuth scope in this class? Is it possible with JWTValidationInfo scopes?
Yes, you can pass an env value or a system property to this class.
System.getenv("ENDPOINT")
System.getProperty("ENDPOINT")
jwtInfoDto.getKeyType()
jwtInfoDto. getJwtValidationInfo().getScopes();