Changes in Release 2.2.0
=============================================
[SIDP-397] - Remove any unit test that won't be fixed in the 2.X branch, fix the rest
+[SIDP-392] - NullPointerException in LoginContext when authentication method information is null
[SIDP-388] - Add eduPersonAssurance attribute to attribute-resolver.xml config example
[SIDP-386] - Session indexes not cleared when session is destroyed
[SIDP-384] - Incorrect error message set for expired request in Shibboleth SSO Profile Handler
package edu.internet2.middleware.shibboleth.idp.authn;
import java.io.Serializable;
+import java.security.Principal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
* @return The duration of authentication, or zero if none was set.
*/
public synchronized long getAuthenticationDuration() {
+ if(authenticationMethodInformation == null){
+ return 0;
+ }
+
return authenticationMethodInformation.getAuthenticationDuration();
}
* @return The instant of authentication, or <code>null</code> if none was set.
*/
public synchronized DateTime getAuthenticationInstant() {
+ if(authenticationMethodInformation == null){
+ return null;
+ }
+
return authenticationMethodInformation.getAuthenticationInstant();
}
* @return The method used to authenticate the user.
*/
public synchronized String getAuthenticationMethod() {
+ if(authenticationMethodInformation == null){
+ return null;
+ }
return authenticationMethodInformation.getAuthenticationMethod();
}
* @return the ID of the user, or <code>null</code> if authentication failed.
*/
public synchronized String getPrincipalName() {
- return authenticationMethodInformation.getAuthenticationPrincipal().getName();
+ if(authenticationMethodInformation == null){
+ return null;
+ }
+
+ Principal principal = authenticationMethodInformation.getAuthenticationPrincipal();
+ if(principal == null){
+ return null;
+ }
+
+ return principal.getName();
}
/**