mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-103: Implement common redirect form field.
This commit is contained in:
		| @@ -1,28 +0,0 @@ | ||||
| /* | ||||
|  * Licensed to the Apache Software Foundation (ASF) under one | ||||
|  * or more contributor license agreements.  See the NOTICE file | ||||
|  * distributed with this work for additional information | ||||
|  * regarding copyright ownership.  The ASF licenses this file | ||||
|  * to you under the Apache License, Version 2.0 (the | ||||
|  * "License"); you may not use this file except in compliance | ||||
|  * with the License.  You may obtain a copy of the License at | ||||
|  * | ||||
|  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, | ||||
|  * software distributed under the License is distributed on an | ||||
|  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||
|  * KIND, either express or implied.  See the License for the | ||||
|  * specific language governing permissions and limitations | ||||
|  * under the License. | ||||
|  */ | ||||
|  | ||||
| /** | ||||
|  * Module which provides handling for CAS authentication. | ||||
|  */ | ||||
| angular.module('guacCAS', [ | ||||
|     'form' | ||||
| ]); | ||||
|  | ||||
| // Ensure the CAS module is loaded along with the rest of the app | ||||
| angular.module('index').requires.push('guacCAS'); | ||||
| @@ -1,33 +0,0 @@ | ||||
| /* | ||||
|  * Licensed to the Apache Software Foundation (ASF) under one | ||||
|  * or more contributor license agreements.  See the NOTICE file | ||||
|  * distributed with this work for additional information | ||||
|  * regarding copyright ownership.  The ASF licenses this file | ||||
|  * to you under the Apache License, Version 2.0 (the | ||||
|  * "License"); you may not use this file except in compliance | ||||
|  * with the License.  You may obtain a copy of the License at | ||||
|  * | ||||
|  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, | ||||
|  * software distributed under the License is distributed on an | ||||
|  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||
|  * KIND, either express or implied.  See the License for the | ||||
|  * specific language governing permissions and limitations | ||||
|  * under the License. | ||||
|  */ | ||||
|  | ||||
| /** | ||||
|  * Config block which registers CAS-specific field types. | ||||
|  */ | ||||
| angular.module('guacCAS').config(['formServiceProvider', | ||||
|         function guacCASConfig(formServiceProvider) { | ||||
|  | ||||
|     // Define field for ticket from CAS service | ||||
|     formServiceProvider.registerFieldType("GUAC_CAS_TICKET", { | ||||
|         templateUrl   : 'app/ext/guac-cas/templates/casTicketField.html', | ||||
|         controller    : 'guacCASController', | ||||
|         module        : 'guacCAS' | ||||
|     }); | ||||
|  | ||||
| }]); | ||||
| @@ -1,30 +0,0 @@ | ||||
| /* | ||||
|  * Licensed to the Apache Software Foundation (ASF) under one | ||||
|  * or more contributor license agreements.  See the NOTICE file | ||||
|  * distributed with this work for additional information | ||||
|  * regarding copyright ownership.  The ASF licenses this file | ||||
|  * to you under the Apache License, Version 2.0 (the | ||||
|  * "License"); you may not use this file except in compliance | ||||
|  * with the License.  You may obtain a copy of the License at | ||||
|  * | ||||
|  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, | ||||
|  * software distributed under the License is distributed on an | ||||
|  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||
|  * KIND, either express or implied.  See the License for the | ||||
|  * specific language governing permissions and limitations | ||||
|  * under the License. | ||||
|  */ | ||||
|  | ||||
| /** | ||||
|  * Controller for the "GUAC_CAS_TICKET" field which simply redirects the user | ||||
|  * immediately to the authorization URI. | ||||
|  */ | ||||
| angular.module('guacCAS').controller('guacCASController', ['$scope',  | ||||
|     function guacCASController($scope) { | ||||
|  | ||||
|         // Redirect to authorization URI | ||||
|         window.location = $scope.field.authorizationURI; | ||||
|  | ||||
| }]); | ||||
| @@ -1,35 +0,0 @@ | ||||
| /* | ||||
|  * Licensed to the Apache Software Foundation (ASF) under one | ||||
|  * or more contributor license agreements.  See the NOTICE file | ||||
|  * distributed with this work for additional information | ||||
|  * regarding copyright ownership.  The ASF licenses this file | ||||
|  * to you under the Apache License, Version 2.0 (the | ||||
|  * "License"); you may not use this file except in compliance | ||||
|  * with the License.  You may obtain a copy of the License at | ||||
|  * | ||||
|  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, | ||||
|  * software distributed under the License is distributed on an | ||||
|  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||
|  * KIND, either express or implied.  See the License for the | ||||
|  * specific language governing permissions and limitations | ||||
|  * under the License. | ||||
|  */ | ||||
|  | ||||
| .cas-ticket-field-container { | ||||
|     height: 100%; | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     left: 0; | ||||
|     top: 0; | ||||
|     display: table; | ||||
|     background: white; | ||||
| } | ||||
|  | ||||
| .cas-ticket-field { | ||||
|     width: 100%; | ||||
|     display: table-cell; | ||||
|     vertical-align: middle; | ||||
|     text-align: center; | ||||
| } | ||||
| @@ -1,5 +0,0 @@ | ||||
| <div class="cas-ticket-field-container"> | ||||
|     <div class="cas-ticket-field"> | ||||
|         <p>{{ 'LOGIN.INFO_CAS_REDIRECT_PENDING' | translate }}</p> | ||||
|     </div> | ||||
| </div> | ||||
		Reference in New Issue
	
	Block a user