The 1.0.1 documentation for OpenID (Integrate with OpenID / OpenID Integration sections) doesn't cover a possible case of failure. It is possible that the call to OpenID.id(user).verify() in the existing example could return false. If it does (a bad user String was given, for example) Play! will just render a blank page, as no redirects or calls to render are made.
My solution was to do the following, and wrap the call in an if statement that does the same as the first case failure:
The 1.0.1 documentation for OpenID (Integrate with OpenID / OpenID Integration sections) doesn't cover a possible case of failure. It is possible that the call to OpenID. id(user) .verify( ) in the existing example could return false. If it does (a bad user String was given, for example) Play! will just render a blank page, as no redirects or calls to render are made.
My solution was to do the following, and wrap the call in an if statement that does the same as the first case failure:
public static void authenticate(String user) { isAuthenticatio nResponse( )) { getVerifiedID( ); put("error" , "Oops, authentication failed."); put("user" , verifiedUser.id); OpenID. id(user) .verify( )) { put("error" , "Oops, authentication failed.");
if(OpenID.
UserInfo verifiedUser = OpenID.
if(verifiedUser == null) {
flash.
login();
}
session.
index();
} else {
// verify call will redirect user on success
if(!
flash.
login();
}
}
}