clientId and authenticationHolderId now being set properly on tokens.
parent
99c8e1c285
commit
7d66b15a0f
|
@ -533,8 +533,8 @@ public class MITREidDataService_1_0 implements MITREidDataService {
|
||||||
} else if (name.equals(REFRESHTOKENS)) {
|
} else if (name.equals(REFRESHTOKENS)) {
|
||||||
readRefreshTokens(reader);
|
readRefreshTokens(reader);
|
||||||
} else if (name.equals(SYSTEMSCOPES)) {
|
} else if (name.equals(SYSTEMSCOPES)) {
|
||||||
readSystemScopes(reader);
|
//readSystemScopes(reader);
|
||||||
//reader.skipValue();
|
reader.skipValue();
|
||||||
} else {
|
} else {
|
||||||
// unknown token, skip it
|
// unknown token, skip it
|
||||||
reader.skipValue();
|
reader.skipValue();
|
||||||
|
@ -542,10 +542,11 @@ public class MITREidDataService_1_0 implements MITREidDataService {
|
||||||
break;
|
break;
|
||||||
case END_OBJECT:
|
case END_OBJECT:
|
||||||
// the object ended, we're done here
|
// the object ended, we're done here
|
||||||
fixObjectReferences();
|
reader.endObject();
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fixObjectReferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<Long, String> refreshTokenToClientRefs = new HashMap<Long, String>();
|
private Map<Long, String> refreshTokenToClientRefs = new HashMap<Long, String>();
|
||||||
|
@ -669,8 +670,12 @@ public class MITREidDataService_1_0 implements MITREidDataService {
|
||||||
Long newId = tokenRepository.saveAccessToken(token).getId();
|
Long newId = tokenRepository.saveAccessToken(token).getId();
|
||||||
accessTokenToClientRefs.put(currentId, clientId);
|
accessTokenToClientRefs.put(currentId, clientId);
|
||||||
accessTokenToAuthHolderRefs.put(currentId, authHolderId);
|
accessTokenToAuthHolderRefs.put(currentId, authHolderId);
|
||||||
accessTokenToRefreshTokenRefs.put(currentId, refreshTokenId);
|
if(refreshTokenId != null) {
|
||||||
accessTokenToIdTokenRefs.put(currentId, idTokenId);
|
accessTokenToRefreshTokenRefs.put(currentId, refreshTokenId);
|
||||||
|
}
|
||||||
|
if(idTokenId != null) {
|
||||||
|
accessTokenToIdTokenRefs.put(currentId, idTokenId);
|
||||||
|
}
|
||||||
accessTokenOldToNewIdMap.put(currentId, newId);
|
accessTokenOldToNewIdMap.put(currentId, newId);
|
||||||
logger.debug("Read access token {}", currentId);
|
logger.debug("Read access token {}", currentId);
|
||||||
} catch (ParseException ex) {
|
} catch (ParseException ex) {
|
||||||
|
|
Loading…
Reference in New Issue