Skip to content

Commit

Permalink
feat(jans-auth-server): if applicationType is not set during client r…
Browse files Browse the repository at this point in the history
…egistration AS should default to 'web' #1687
  • Loading branch information
yuriyz committed Jul 8, 2022
1 parent 42be074 commit f9695e1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import io.jans.as.model.exception.InvalidJwtException;
import io.jans.as.model.json.JsonApplier;
import io.jans.as.model.jwt.Jwt;
import io.jans.as.model.register.ApplicationType;
import io.jans.as.model.register.RegisterErrorResponseType;
import io.jans.as.persistence.model.Scope;
import io.jans.as.server.ciba.CIBARegisterClientMetadataService;
Expand Down Expand Up @@ -96,9 +97,9 @@ public void updateClientFromRequestObject(Client client, RegisterRequest request
claimsRedirectUris = new ArrayList<>(new HashSet<>(claimsRedirectUris)); // Remove repeated elements
client.setClaimRedirectUris(claimsRedirectUris.toArray(new String[0]));
}
if (requestObject.getApplicationType() != null) {
client.setApplicationType(requestObject.getApplicationType());
}

client.setApplicationType(requestObject.getApplicationType() != null ? requestObject.getApplicationType() : ApplicationType.WEB);

if (StringUtils.isNotBlank(requestObject.getSectorIdentifierUri())) {
client.setSectorIdentifierUri(requestObject.getSectorIdentifierUri());
}
Expand Down

0 comments on commit f9695e1

Please sign in to comment.