mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-38: Get rid of unnecessary userContext initialization.
This commit is contained in:
@@ -31,11 +31,6 @@ import org.apache.guacamole.net.auth.UserContext;
|
|||||||
*/
|
*/
|
||||||
public class QuickConnectAuthenticationProvider extends AbstractAuthenticationProvider {
|
public class QuickConnectAuthenticationProvider extends AbstractAuthenticationProvider {
|
||||||
|
|
||||||
/**
|
|
||||||
* userContext for this authentication provider.
|
|
||||||
*/
|
|
||||||
private UserContext userContext;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return "quickconnect";
|
return "quickconnect";
|
||||||
@@ -45,11 +40,8 @@ public class QuickConnectAuthenticationProvider extends AbstractAuthenticationPr
|
|||||||
public UserContext getUserContext(AuthenticatedUser authenticatedUser)
|
public UserContext getUserContext(AuthenticatedUser authenticatedUser)
|
||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
|
|
||||||
if (userContext == null)
|
return new QuickConnectUserContext(this,
|
||||||
userContext = new QuickConnectUserContext(this,
|
authenticatedUser.getIdentifier());
|
||||||
authenticatedUser.getIdentifier());
|
|
||||||
|
|
||||||
return userContext;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user