public UserInfo load(UserIdentifier userIdentifier) { Credentials credentials = new Credentials( userIdentifier.getIdentifier(), userIdentifier.getSecret()); User user = authenticateClientResource .authenticate(credentials); if (user == null) { // Authentication should throw an error instead of // returning // null throw new AgentException( "Authentication should not return null"); } return new UserInfo(user, userIdentifier.getSecret()); } };
public UserInfo load(UserIdentifier userIdentifier) { Credentials credentials = new Credentials( userIdentifier.getIdentifier(), userIdentifier.getSecret()); User user = authenticateClientResource .authenticate(credentials); if (user == null) { // Authentication should throw an error instead of // returning // null throw new AgentException( "Authentication should not return null"); } return new UserInfo(user, userIdentifier.getSecret()); } };
public UserInfo load(UserIdentifier userIdentifier) { Credentials credentials = new Credentials( userIdentifier.getIdentifier(), userIdentifier.getSecret()); User user = authenticateClientResource .authenticate(credentials); if (user == null) { // Authentication should throw an error instead of // returning // null throw new AgentException( "Authentication should not return null"); } return new UserInfo(user, userIdentifier.getSecret()); } };
public UserInfo load(UserIdentifier userIdentifier) { Credentials credentials = new Credentials( userIdentifier.getIdentifier(), userIdentifier.getSecret()); User user = authenticateClientResource .authenticate(credentials); if (user == null) { // Authentication should throw an error instead of // returning // null throw new AgentException( "Authentication should not return null"); } return new UserInfo(user, userIdentifier.getSecret()); } };
.getUnchecked(userIdentifier); if (userInfo == null) { throw new AgentException("User could not be null"); throw new AgentException( "Unexpected error during user authentication error of user: " + identifier, e);
.getUnchecked(userIdentifier); if (userInfo == null) { throw new AgentException("User could not be null"); throw new AgentException( "Unexpected error during user authentication error of user: " + identifier, e);
.getUnchecked(userIdentifier); if (userInfo == null) { throw new AgentException("User could not be null"); throw new AgentException( "Unexpected error during user authentication error of user: " + identifier, e);
.getUnchecked(userIdentifier); if (userInfo == null) { throw new AgentException("User could not be null"); throw new AgentException( "Unexpected error during user authentication error of user: " + identifier, e);