mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-540: Clean up Credentials with new constructor.
This commit is contained in:
@@ -55,7 +55,7 @@ public class TokenRESTService {
|
||||
* Logger for this class.
|
||||
*/
|
||||
private static final Logger logger = LoggerFactory.getLogger(TokenRESTService.class);
|
||||
|
||||
|
||||
/**
|
||||
* Service for authenticating users and managing their Guacamole sessions.
|
||||
*/
|
||||
@@ -117,13 +117,7 @@ public class TokenRESTService {
|
||||
} // end Authorization header fallback
|
||||
|
||||
// Build credentials
|
||||
Credentials credentials = new Credentials();
|
||||
credentials.setUsername(username);
|
||||
credentials.setPassword(password);
|
||||
credentials.setRequest(request);
|
||||
credentials.setSession(request.getSession(false));
|
||||
|
||||
return credentials;
|
||||
return new Credentials(username, password, request);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -155,11 +155,8 @@ public class UserResource
|
||||
@Context HttpServletRequest request) throws GuacamoleException {
|
||||
|
||||
// Build credentials
|
||||
Credentials credentials = new Credentials();
|
||||
credentials.setUsername(user.getIdentifier());
|
||||
credentials.setPassword(userPasswordUpdate.getOldPassword());
|
||||
credentials.setRequest(request);
|
||||
credentials.setSession(request.getSession(false));
|
||||
Credentials credentials = new Credentials(user.getIdentifier(),
|
||||
userPasswordUpdate.getOldPassword(), request);
|
||||
|
||||
// Verify that the old password was correct
|
||||
try {
|
||||
|
Reference in New Issue
Block a user