Had to hand-merge some things; git got confused
Conflicts: openid-connect-server/src/main/java/org/mitre/openid/connect/token/ConnectTokenEnhancer.javapull/650/head
parent
546fb24019
commit
63cf621f2f
|
@ -26,7 +26,6 @@ import org.mitre.oauth2.model.ClientDetailsEntity;
|
||||||
import org.mitre.oauth2.model.OAuth2AccessTokenEntity;
|
import org.mitre.oauth2.model.OAuth2AccessTokenEntity;
|
||||||
import org.mitre.oauth2.service.ClientDetailsEntityService;
|
import org.mitre.oauth2.service.ClientDetailsEntityService;
|
||||||
import org.mitre.openid.connect.config.ConfigurationPropertiesBean;
|
import org.mitre.openid.connect.config.ConfigurationPropertiesBean;
|
||||||
import org.mitre.openid.connect.service.ApprovedSiteService;
|
|
||||||
import org.mitre.openid.connect.util.JWSUtils;
|
import org.mitre.openid.connect.util.JWSUtils;
|
||||||
import org.mitre.openid.connect.web.AuthenticationTimeStamper;
|
import org.mitre.openid.connect.web.AuthenticationTimeStamper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -148,7 +147,7 @@ public class ConnectTokenEnhancer implements TokenEnhancer {
|
||||||
Set<String> responseTypes = OAuth2Utils.parseParameterList(responseType);
|
Set<String> responseTypes = OAuth2Utils.parseParameterList(responseType);
|
||||||
if (responseTypes.contains("token")) {
|
if (responseTypes.contains("token")) {
|
||||||
// calculate the token hash
|
// calculate the token hash
|
||||||
Base64URL at_hash = JWSUtils.getAccessTokenHash(signingAlg, token.getJwt().serialize().getBytes());
|
Base64URL at_hash = JWSUtils.getAccessTokenHash(signingAlg, token);
|
||||||
//TODO: What should happen if the hash cannot be calculated?
|
//TODO: What should happen if the hash cannot be calculated?
|
||||||
idClaims.setClaim("at_hash", at_hash);
|
idClaims.setClaim("at_hash", at_hash);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue