87 final RpService rpService = ServerLauncher.getInjector().getInstance(RpService.class);
88 final Rp rp = rpService.getRp(params.
getOxdId());
89 if (rp.getSetupClient() != null && rp.getSetupClient()) {
94 final OxdServerConfiguration configuration = ServerLauncher.getInjector().getInstance(ConfigurationService.class).get();
95 if (configuration.getProtectCommandsWithAccessToken() != null && !configuration.getProtectCommandsWithAccessToken()) {
103 if (StringUtils.isBlank(accessToken)) {
104 throw new ErrorResponseException(ErrorResponseCode.BLANK_PROTECTION_ACCESS_TOKEN);
110 final RpService rpService = ServerLauncher.getInjector().getInstance(RpService.class);
112 final Rp rp = rpService.getRp(params.
getOxdId());
113 if (StringUtils.isBlank(rp.getSetupClientId())) {
114 throw new ErrorResponseException(ErrorResponseCode.NO_SETUP_CLIENT_FOR_OXD_ID);
117 final IntrospectionResponse introspectionResponse =
introspect(accessToken, params.
getOxdId());
119 LOG.trace(
"access_token: " + accessToken +
", introspection: " + introspectionResponse +
", setupClientId: " + rp.getSetupClientId());
120 if (StringUtils.isBlank(introspectionResponse.getClientId())) {
121 throw new ErrorResponseException(ErrorResponseCode.NO_CLIENT_ID_IN_INTROSPECTION_RESPONSE);
124 if (introspectionResponse.getClientId().equals(rp.getSetupClientId())) {
128 throw new ErrorResponseException(ErrorResponseCode.INVALID_PROTECTION_ACCESS_TOKEN);
IntrospectionResponse introspect(String accessToken, String oxdId)
Definition: ValidationService.java:131
Definition: UpdateSiteParams.java:15
String getProtectionAccessToken()
static final Logger LOG
Definition: ValidationService.java:21
Definition: SetupClientParams.java:11
Definition: RegisterSiteParams.java:15