From 4f9cbb4b3f72a27fbe228a3b0cbd685843299b98 Mon Sep 17 00:00:00 2001 From: William Kim Date: Thu, 27 Jun 2013 09:15:59 -0400 Subject: [PATCH] added check for null --- .../oauth2/service/impl/DefaultOAuth2ProviderTokenService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java index dc190fa83..c51c7cf9c 100644 --- a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java +++ b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java @@ -154,7 +154,7 @@ public class DefaultOAuth2ProviderTokenService implements OAuth2TokenEntityServi //Add approved site reference, if any StoredOAuth2Request originalAuthRequest = authHolder.getAuthentication().getStoredRequest(); - if (originalAuthRequest.getExtensionProperties().containsKey("approved_site")) { + if (originalAuthRequest.getExtensionProperties() != null && originalAuthRequest.getExtensionProperties().containsKey("approved_site")) { Long apId = (Long) originalAuthRequest.getExtensionProperties().get("approved_site"); ApprovedSite ap = approvedSiteService.getById(apId);