mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-197: Fix a couple of style issues and add the username variable to the RadiusChallengeResponseField class. Fixes build error.
This commit is contained in:
committed by
Nick Couchman
parent
d8f6422e28
commit
f7dda23b05
@@ -122,17 +122,18 @@ public class AuthenticationProviderService {
|
||||
try {
|
||||
String replyMsg = radPack.getAttributeValue("Reply-Message").toString();
|
||||
String radState = radPack.getAttributeValue("State").toString();
|
||||
logger.debug("RADIUS sent challenge response: {}", replyMsg);
|
||||
logger.debug("RADIUS sent challenge: {}", replyMsg);
|
||||
logger.debug("RADIUS sent state: {}", radState);
|
||||
Field radiusResponseField = new RadiusChallengeResponseField(credentials.getUsername(), replyMsg, radState);
|
||||
CredentialsInfo expectedCredentials = new CredentialsInfo(Collections.singletonList(radiusResponseField));
|
||||
throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
|
||||
}
|
||||
catch(UnknownAttributeException e) {
|
||||
}
|
||||
catch(UnknownAttributeException e) {
|
||||
logger.error("Error in talks with RADIUS server.");
|
||||
logger.debug("RADIUS challenged by didn't provide right attributes.");
|
||||
throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
|
||||
}
|
||||
return null;
|
||||
// throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
|
||||
}
|
||||
}
|
||||
|
||||
// If we receive AccessAccept, authentication has succeeded
|
||||
|
@@ -44,6 +44,7 @@ public class RadiusChallengeResponseField extends Field {
|
||||
/**
|
||||
* The username used for the RADIUS authentication attempt.
|
||||
*/
|
||||
private final String username;
|
||||
|
||||
/**
|
||||
* The state of the connection passed by the previous RADIUS attempt.
|
||||
|
Reference in New Issue
Block a user