mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-526: Merge changes correcting regression in CAS due to AngularJS update.
Including `ngRoute` as a dependency of a module which defines a custom field type will always result in the following error: Unknown provider: $rootElementProvider <- $rootElement <- $location <- $route <- $location This seems to be due to the manner in which the injector is created for field types. `$rootElementProvider` is not available for injection in the context of the injector of a custom field. This is generally OK, but `ngRoute` transitively depends on `$rootElementProvider`. Since `$rootElementProvider` cannot be injected within the context of a field type, no field type can depend on ngRoute without causing this error. Note that extensions can still leverage `ngRoute` (this is already done by the OpenID support). It just cannot be declared as a dependency of a module containing a custom field type.
This commit is contained in:
@@ -23,12 +23,11 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import java.util.Arrays;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.apache.guacamole.environment.Environment;
|
||||
import org.apache.guacamole.form.Field;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.net.auth.Credentials;
|
||||
import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
|
||||
import org.apache.guacamole.net.auth.credentials.GuacamoleInsufficientCredentialsException;
|
||||
import org.apache.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException;
|
||||
import org.apache.guacamole.auth.cas.conf.ConfigurationService;
|
||||
import org.apache.guacamole.auth.cas.form.CASTicketField;
|
||||
import org.apache.guacamole.auth.cas.ticket.TicketValidationService;
|
||||
@@ -46,12 +45,6 @@ public class AuthenticationProviderService {
|
||||
@Inject
|
||||
private ConfigurationService confService;
|
||||
|
||||
/**
|
||||
* The Guacamole server environment.
|
||||
*/
|
||||
@Inject
|
||||
private Environment environment;
|
||||
|
||||
/**
|
||||
* Service for validating received ID tickets.
|
||||
*/
|
||||
@@ -97,8 +90,7 @@ public class AuthenticationProviderService {
|
||||
}
|
||||
|
||||
// Request CAS ticket
|
||||
throw new GuacamoleInsufficientCredentialsException(
|
||||
"LOGIN.INFO_CAS_REDIRECT_PENDING",
|
||||
throw new GuacamoleInvalidCredentialsException("Invalid login.",
|
||||
new CredentialsInfo(Arrays.asList(new Field[] {
|
||||
|
||||
// CAS-specific ticket (will automatically redirect the user
|
||||
|
@@ -20,7 +20,6 @@
|
||||
package org.apache.guacamole.auth.cas.conf;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import java.io.File;
|
||||
import java.security.PrivateKey;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.environment.Environment;
|
||||
|
@@ -23,10 +23,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.IllegalArgumentException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.PrivateKey;
|
||||
@@ -35,8 +32,6 @@ import java.security.spec.KeySpec;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import org.apache.guacamole.properties.GuacamoleProperty;
|
||||
import org.apache.guacamole.GuacamoleServerException;
|
||||
import org.apache.guacamole.environment.Environment;
|
||||
import org.apache.guacamole.environment.LocalEnvironment;
|
||||
|
||||
/**
|
||||
* A GuacamoleProperty whose value is derived from a private key file.
|
||||
|
@@ -20,9 +20,7 @@
|
||||
package org.apache.guacamole.auth.cas.form;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigInteger;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.SecureRandom;
|
||||
import org.apache.guacamole.form.Field;
|
||||
|
||||
|
||||
|
@@ -21,8 +21,7 @@
|
||||
* Module which provides handling for CAS authentication.
|
||||
*/
|
||||
angular.module('guacCAS', [
|
||||
'form',
|
||||
'ngRoute',
|
||||
'form'
|
||||
]);
|
||||
|
||||
// Ensure the CAS module is loaded along with the rest of the app
|
||||
|
Reference in New Issue
Block a user