Get rid of unnecessary userContext initialization.
@@ -31,11 +31,6 @@ import org.apache.guacamole.net.auth.UserContext;
*/
public class QuickConnectAuthenticationProvider extends AbstractAuthenticationProvider {
- /**
- * userContext for this authentication provider.
- */
- private UserContext userContext;
-
@Override
public String getIdentifier() {
return "quickconnect";
@@ -45,12 +40,9 @@ public class QuickConnectAuthenticationProvider extends AbstractAuthenticationPr
public UserContext getUserContext(AuthenticatedUser authenticatedUser)
throws GuacamoleException {
- if (userContext == null)
- userContext = new QuickConnectUserContext(this,
+ return new QuickConnectUserContext(this,
authenticatedUser.getIdentifier());
- return userContext;
-
}
}
