Skip to content

Commit dd82bcf

Browse files
committed
Minor fine-tuning
1 parent 389835b commit dd82bcf

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/main/java/org/oidc/service/oidc/Registration.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ public Registration(ServiceContext serviceContext, State state, ServiceConfig se
6767
@Override
6868
protected void doUpdateServiceContext(Message response, String stateKey)
6969
throws MissingRequiredAttributeException, ValueException, InvalidClaimException {
70-
if (response == null || !(response instanceof RegistrationResponse)) {
71-
throw new ValueException("Unexpected response message type, should be RegistrationResponse");
72-
}
73-
this.responseMessage = response;
7470
if (!response.getClaims().containsKey("token_endpoint_auth_method")) {
7571
response.getClaims().put("token_endpoint_auth_method", "client_secret_basic");
7672
}
@@ -81,6 +77,7 @@ protected void doUpdateServiceContext(Message response, String stateKey)
8177
getServiceContext()
8278
.setRegistrationAccessToken((String) response.getClaims().get("registration_access_token"));
8379
getServiceContext().setRegistrationResponse((RegistrationResponse) response);
80+
this.responseMessage = response;
8481
}
8582

8683
@Override

0 commit comments

Comments
 (0)