mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUACAMOLE-210: Refactor source referencing OAuth to OpenID. This extension uses OpenID, not OAuth.
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
|
||||
"guacamoleVersion" : "0.9.11-incubating",
|
||||
|
||||
"name" : "OAuth Authentication Extension",
|
||||
"namespace" : "guac-oauth",
|
||||
"name" : "OpenID Authentication Extension",
|
||||
"namespace" : "guac-openid",
|
||||
|
||||
"authProviders" : [
|
||||
"org.apache.guacamole.auth.oauth.OAuthAuthenticationProvider"
|
||||
"org.apache.guacamole.auth.openid.OpenIDAuthenticationProvider"
|
||||
],
|
||||
|
||||
"js" : [
|
||||
"oauthModule.js",
|
||||
"oauthController.js",
|
||||
"oauthConfig.js"
|
||||
"openidModule.js",
|
||||
"openidController.js",
|
||||
"openidConfig.js"
|
||||
]
|
||||
|
||||
}
|
||||
|
@@ -18,16 +18,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Config block which registers OAuth-specific field types.
|
||||
* Config block which registers openid-specific field types.
|
||||
*/
|
||||
angular.module('guacOAuth').config(['formServiceProvider',
|
||||
function guacOAuthConfig(formServiceProvider) {
|
||||
angular.module('guacOpenID').config(['formServiceProvider',
|
||||
function guacOpenIDConfig(formServiceProvider) {
|
||||
|
||||
// Define field for token from OAuth service
|
||||
formServiceProvider.registerFieldType("GUAC_OAUTH_TOKEN", {
|
||||
// Define field for token from OpenID service
|
||||
formServiceProvider.registerFieldType("GUAC_OPENID_TOKEN", {
|
||||
template : '',
|
||||
controller : 'guacOAuthController',
|
||||
module : 'guacOAuth'
|
||||
controller : 'guacOpenIDController',
|
||||
module : 'guacOpenID'
|
||||
});
|
||||
|
||||
}]);
|
@@ -18,11 +18,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Controller for the "GUAC_OAUTH_TOKEN" field which simply redirects the user
|
||||
* Controller for the "GUAC_OPENID_TOKEN" field which simply redirects the user
|
||||
* immediately to the authorization URI.
|
||||
*/
|
||||
angular.module('guacOAuth').controller('guacOAuthController', ['$scope',
|
||||
function guacOAuthController($scope) {
|
||||
angular.module('guacOpenID').controller('guacOpenIDController', ['$scope',
|
||||
function guacOpenIDController($scope) {
|
||||
|
||||
// Redirect to authorization URI
|
||||
window.location = $scope.field.authorizationURI;
|
@@ -18,11 +18,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module which provides handling for OAuth authentication.
|
||||
* Module which provides handling for OpenID authentication.
|
||||
*/
|
||||
angular.module('guacOAuth', [
|
||||
angular.module('guacOpenID', [
|
||||
'form'
|
||||
]);
|
||||
|
||||
// Ensure the OAuth module is loaded along with the rest of the app
|
||||
angular.module('index').requires.push('guacOAuth');
|
||||
// Ensure the OpenID module is loaded along with the rest of the app
|
||||
angular.module('index').requires.push('guacOpenID');
|
Reference in New Issue
Block a user