mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-210: Add redirect message. Refactor to use minification and pre-cached templates.
This commit is contained in:
3
extensions/guacamole-auth-openid/.gitignore
vendored
Normal file
3
extensions/guacamole-auth-openid/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*~
|
||||||
|
target/
|
||||||
|
src/main/resources/generated/
|
@@ -53,6 +53,85 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Pre-cache Angular templates with maven-angular-plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.keithbranton.mojo</groupId>
|
||||||
|
<artifactId>angular-maven-plugin</artifactId>
|
||||||
|
<version>0.3.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>html2js</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<sourceDir>${basedir}/src/main/resources</sourceDir>
|
||||||
|
<include>**/*.html</include>
|
||||||
|
<target>${basedir}/src/main/resources/generated/templates-main/templates.js</target>
|
||||||
|
<prefix>app/ext/guac-openid</prefix>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- JS/CSS Minification Plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.samaxes.maven</groupId>
|
||||||
|
<artifactId>minify-maven-plugin</artifactId>
|
||||||
|
<version>1.7.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-cli</id>
|
||||||
|
<configuration>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
|
||||||
|
<webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
|
||||||
|
<webappTargetDir>${project.build.directory}/classes</webappTargetDir>
|
||||||
|
|
||||||
|
<cssSourceDir>/</cssSourceDir>
|
||||||
|
<cssTargetDir>/</cssTargetDir>
|
||||||
|
<cssFinalFile>openid.css</cssFinalFile>
|
||||||
|
|
||||||
|
<cssSourceFiles>
|
||||||
|
<cssSourceFile>license.txt</cssSourceFile>
|
||||||
|
</cssSourceFiles>
|
||||||
|
|
||||||
|
<cssSourceIncludes>
|
||||||
|
<cssSourceInclude>**/*.css</cssSourceInclude>
|
||||||
|
</cssSourceIncludes>
|
||||||
|
|
||||||
|
<jsSourceDir>/</jsSourceDir>
|
||||||
|
<jsTargetDir>/</jsTargetDir>
|
||||||
|
<jsFinalFile>openid.js</jsFinalFile>
|
||||||
|
|
||||||
|
<jsSourceFiles>
|
||||||
|
<jsSourceFile>license.txt</jsSourceFile>
|
||||||
|
</jsSourceFiles>
|
||||||
|
|
||||||
|
<jsSourceIncludes>
|
||||||
|
<jsSourceInclude>**/*.js</jsSourceInclude>
|
||||||
|
</jsSourceIncludes>
|
||||||
|
|
||||||
|
<!-- Do not minify and include tests -->
|
||||||
|
<jsSourceExcludes>
|
||||||
|
<jsSourceExclude>**/*.test.js</jsSourceExclude>
|
||||||
|
</jsSourceExcludes>
|
||||||
|
<jsEngine>CLOSURE</jsEngine>
|
||||||
|
|
||||||
|
<!-- Disable warnings for JSDoc annotations -->
|
||||||
|
<closureWarningLevels>
|
||||||
|
<misplacedTypeAnnotation>OFF</misplacedTypeAnnotation>
|
||||||
|
<nonStandardJsDocs>OFF</nonStandardJsDocs>
|
||||||
|
</closureWarningLevels>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>minify</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!-- Copy dependencies prior to packaging -->
|
<!-- Copy dependencies prior to packaging -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@@ -105,6 +184,7 @@
|
|||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/*.json</exclude>
|
<exclude>**/*.json</exclude>
|
||||||
<exclude>src/licenses/**/*</exclude>
|
<exclude>src/licenses/**/*</exclude>
|
||||||
|
<exclude>src/main/resources/templates/*.html</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@ angular.module('guacOpenID').config(['formServiceProvider',
|
|||||||
|
|
||||||
// Define field for token from OpenID service
|
// Define field for token from OpenID service
|
||||||
formServiceProvider.registerFieldType("GUAC_OPENID_TOKEN", {
|
formServiceProvider.registerFieldType("GUAC_OPENID_TOKEN", {
|
||||||
|
templateUrl : 'app/ext/guac-openid/templates/openidTokenField.html',
|
||||||
controller : 'guacOpenIDController',
|
controller : 'guacOpenIDController',
|
||||||
module : 'guacOpenID'
|
module : 'guacOpenID'
|
||||||
});
|
});
|
@@ -9,10 +9,20 @@
|
|||||||
"org.apache.guacamole.auth.openid.OpenIDAuthenticationProvider"
|
"org.apache.guacamole.auth.openid.OpenIDAuthenticationProvider"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"translations" : [
|
||||||
|
"translations/en.json"
|
||||||
|
],
|
||||||
|
|
||||||
"js" : [
|
"js" : [
|
||||||
"openidModule.js",
|
"openid.min.js"
|
||||||
"openidController.js",
|
],
|
||||||
"openidConfig.js"
|
|
||||||
]
|
"css" : [
|
||||||
|
"openid.min.css"
|
||||||
|
],
|
||||||
|
|
||||||
|
"resources" : {
|
||||||
|
"templates/openidTokenField.html" : "text/html"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.openid-token-field-container {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
display: table;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openid-token-field {
|
||||||
|
width: 100%;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
}
|
@@ -0,0 +1,5 @@
|
|||||||
|
<div class="openid-token-field-container">
|
||||||
|
<div class="openid-token-field">
|
||||||
|
<p>{{ 'LOGIN.INFO_REDIRECT_PENDING' | translate }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
"DATA_SOURCE_OPENID" : {
|
||||||
|
"NAME" : "OpenID SSO Backend"
|
||||||
|
},
|
||||||
|
|
||||||
|
"LOGIN" : {
|
||||||
|
"FIELD_HEADER_ID_TOKEN" : "",
|
||||||
|
"INFO_REDIRECT_PENDING" : "Please wait, redirecting to identity provider..."
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user