use of org.gluu.oxauth.service.external.context.DynamicClientRegistrationContext in project oxAuth by GluuFederation.
the class ExternalDynamicClientRegistrationService method getSoftwareStatementJwks.
public JSONObject getSoftwareStatementJwks(HttpServletRequest httpRequest, JSONObject registerRequest, Jwt softwareStatement) {
try {
log.trace("Executing python 'getSoftwareStatementJwks' method");
DynamicClientRegistrationContext context = new DynamicClientRegistrationContext(httpRequest, registerRequest, defaultExternalCustomScript);
context.setSoftwareStatement(softwareStatement);
ClientRegistrationType externalType = (ClientRegistrationType) defaultExternalCustomScript.getExternalType();
final String result = externalType.getSoftwareStatementJwks(context);
log.trace("Result of python 'getSoftwareStatementJwks' method: " + result);
return new JSONObject(result);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(defaultExternalCustomScript.getCustomScript(), ex);
return null;
}
}
use of org.gluu.oxauth.service.external.context.DynamicClientRegistrationContext in project oxAuth by GluuFederation.
the class ExternalDynamicClientRegistrationService method getSoftwareStatementHmacSecret.
public String getSoftwareStatementHmacSecret(HttpServletRequest httpRequest, JSONObject registerRequest, Jwt softwareStatement) {
try {
log.trace("Executing python 'getSoftwareStatementHmacSecret' method");
DynamicClientRegistrationContext context = new DynamicClientRegistrationContext(httpRequest, registerRequest, defaultExternalCustomScript);
context.setSoftwareStatement(softwareStatement);
ClientRegistrationType externalType = (ClientRegistrationType) defaultExternalCustomScript.getExternalType();
final String result = externalType.getSoftwareStatementHmacSecret(context);
log.trace("Result of python 'getSoftwareStatementHmacSecret' method: " + result);
return result;
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(defaultExternalCustomScript.getCustomScript(), ex);
return "";
}
}
Aggregations