diff --git a/.gitignore b/.gitignore index 8f5b91a2..70c09acf 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ build/* jdk/* */org/apache/mybatis/jpa/* -org/apache/mybatis/jpa/* \ No newline at end of file +org/apache/mybatis/jpa/* +/.gradle/ diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/build.gradle b/build.gradle index 8922a209..c7b99e61 100644 --- a/build.gradle +++ b/build.gradle @@ -7,12 +7,22 @@ defaultTasks "clean", "build" ext { jackson2Version = "2.9.8" - log4jVersion = "2.11.2" - springVersion = "5.1.6.RELEASE" + log4jVersion = "2.12.0" + springVersion = "5.1.8.RELEASE" + springBootVersion = "2.1.6.RELEASE" springSecurityVersion= "5.1.5.RELEASE" hibernateVersion = "5.4.2.Final" + slf4jVersion = "1.7.26" + jacksonVersion = "2.9.9" } +configurations.all { + transitive = false// 为本依赖关闭依赖传递特性 + // 所有需要忽略的包定义在此 + //all*.exclude group: 'commons-logging' + //exclude group: 'org.slf4j', module: 'slf4j-api' + //compile.exclude module: 'commons' +} // Apply the java plugin to add support for Java //apply plugin: 'java' allprojects { @@ -48,6 +58,14 @@ allprojects { } +buildscript { + repositories { + mavenCentral() + } + dependencies { + // classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.6.RELEASE") + } +} // In this section you declare where to find the dependencies of your project repositories { @@ -59,7 +77,9 @@ repositories { } subprojects { - + //apply plugin: 'org.springframework.boot' + //apply plugin: 'io.spring.dependency-management' + sourceSets { main { java { @@ -88,6 +108,156 @@ subprojects { compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1' compileOnly group: 'javax.servlet', name: 'jstl', version: '1.2' compileOnly group: 'javax.servlet', name: 'jsp-api', version: '2.0' + + compile group: 'org.jboss.logging', name: 'jboss-logging', version: '3.4.0.Final' + + compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3' + compile group: 'commons-codec', name: 'commons-codec', version: '1.12' + compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2' + compile group: 'org.apache.commons', name: 'commons-csv', version: '1.7' + compile group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.6.0' + //compile group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4' + compile group: 'commons-dbutils', name: 'commons-dbutils', version: '1.7' + compile group: 'org.apache.commons', name: 'commons-digester3', version: '3.2' + compile group: 'commons-digester', name: 'commons-digester', version: '2.1' + compile group: 'commons-io', name: 'commons-io', version: '2.6' + compile group: 'commons-lang', name: 'commons-lang', version: '2.6' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' + compile group: 'commons-logging', name: 'commons-logging', version: '1.2' + compile group: 'org.apache.commons', name: 'commons-pool2', version: '2.6.2' + compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1' + compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.4' + compile group: 'org.apache.commons', name: 'commons-email', version: '1.5' + compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6' + compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.6' + compile group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: '4.5.6' + compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.6' + compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.10' + compile group: 'org.apache.velocity', name: 'velocity', version: '1.7' + compile group: 'velocity', name: 'velocity-dep', version: '1.4' + testCompile group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: '0.3.9' + + compile group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}" + compile group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}" + compile group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}" + + compile group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-core', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-aop', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-context', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-context-index', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-core', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-expression', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-jms', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-orm', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-test', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-tx', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-web', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}" + compile group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}" + + compile group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}" + compile group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}" + compile group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}" + + compile group: 'org.opensaml', name: 'opensaml', version: '2.6.4' + compile group: 'org.opensaml', name: 'openws', version: '1.5.4' + compile group: 'org.opensaml', name: 'xmltooling', version: '1.4.4' + + compile group: 'org.javassist', name: 'javassist', version: '3.23.0-GA' + compile group: 'javax.activation', name: 'activation', version: '1.1.1' + compile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2' + compile group: 'javax.transaction', name: 'jta', version: '1.1' + compile group: 'taglibs', name: 'standard', version: '1.1.2' + compile group: 'javax.servlet.jsp.jstl', name: 'jstl', version: '1.2' + compile group: 'javax.transaction', name: 'javax.transaction-api', version: '1.3' + compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final' + compile group: 'org.owasp.esapi', name: 'esapi', version: '2.2.0.0' + + compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.60' + compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60' + compile group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: '1.60' + compile group: 'com.google.crypto.tink', name: 'tink', version: '1.2.2' + + compile group: 'com.github.penggle', name: 'kaptcha', version: '2.3.2' + + compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5' + compile group: 'org.codehaus.jackson', name: 'jackson-all', version: '1.8.5' + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}" + compile group: 'com.fasterxml', name: 'classmate', version: '1.5.0' + + compile group: 'org.reactivestreams', name: 'reactive-streams', version: '1.0.2' + compile group: 'io.projectreactor', name: 'reactor-core', version: '3.2.10.RELEASE' + compile group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: '0.2' + + compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.2.3' + + compile group: 'redis.clients', name: 'jedis', version: '3.0.1' + compile group: 'org.ehcache', name: 'ehcache', version: '3.5.3' + compile group: 'org.mybatis', name: 'mybatis', version: '3.5.1' + compile group: 'org.mybatis', name: 'mybatis-spring', version: '2.0.1' + compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.47' + compile group: 'com.mchange', name: 'c3p0', version: '0.9.5.4' + compile group: 'com.mchange', name: 'mchange-commons-java', version: '0.2.16' + compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.0.17.Final' + compile group: 'org.hibernate', name: 'hibernate-validator-cdi', version: '6.0.17.Final' + compile group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: '6.0.17.Final' + + + compile group: 'net.jradius', name: 'jradius-core', version: '1.1.5' + compile group: 'net.jradius', name: 'jradius-dictionary', version: '1.1.5' + + compile group: 'joda-time', name: 'joda-time', version: '2.10' + compile group: 'org.yaml', name: 'snakeyaml', version: '1.24' + compile group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: '1.9.22' + compile group: 'org.jdom', name: 'jdom', version: '2.0.2' + compile group: 'com.google.zxing', name: 'core', version: '3.4.0' + compile group: 'com.google.guava', name: 'guava', version: '27.1-jre' + compile group: 'ognl', name: 'ognl', version: '3.2.9' + compile group: 'cglib', name: 'cglib', version: '3.2.12' + compile group: 'org.ow2.asm', name: 'asm', version: '7.0' + compile group: 'aopalliance', name: 'aopalliance', version: '1.0' + compile group: 'org.aspectj', name: 'aspectjtools', version: '1.9.4' + compile group: 'dom4j', name: 'dom4j', version: '1.6.1' + compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.1' + compile group: 'javax.xml', name: 'jsr173', version: '1.0' + compile group: 'xalan', name: 'serializer', version: '2.7.2' + compile group: 'xalan', name: 'xalan', version: '2.7.2' + compile group: 'xerces', name: 'xercesImpl', version: '2.12.0' + compile group: 'xml-apis', name: 'xml-apis', version: '1.0.b2' + compile group: 'xml-resolver', name: 'xml-resolver', version: '1.2' + compile group: 'org.apache.santuario', name: 'xmlsec', version: '1.5.8' + compile group: 'org.ogce', name: 'xpp3', version: '1.1.6' + compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.10' + testCompile group: 'xmlunit', name: 'xmlunit', version: '1.6' + + + + compile group: 'com.belerweb', name: 'pinyin4j', version: '2.5.1' + + + compile group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}" + compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: "${springBootVersion}" + compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}" + testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}" + testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19' + + //compile("org.springframework.boot:spring-boot-starter-web") + //testCompile('org.springframework.boot:spring-boot-starter-test') } @@ -143,8 +313,6 @@ subprojects { task copyotherWar2Release(type: Copy) { into "$rootDir/build/" from "$buildDir/libs/" - include '*i18n*.war' - include '*browserlauncher*.war' } //task buildRelease(dependsOn:['build','war','copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << { diff --git a/gradle.properties b/gradle.properties index 9ffda574..800f5c45 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ group=org.maxkey version=1.0.0.RELEASE -vendor=http://www.connsec.com \ No newline at end of file +vendor=https://github.com/shimingxy/MaxKey + + diff --git a/maxkey-authentications/.settings/org.eclipse.jdt.core.prefs b/maxkey-authentications/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..c6e534e1 --- /dev/null +++ b/maxkey-authentications/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs b/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..4248c7fd --- /dev/null +++ b/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,113 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs b/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-core/.settings/org.eclipse.jdt.core.prefs b/maxkey-core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-core/.settings/org.eclipse.jdt.launching.prefs b/maxkey-core/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-core/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-core/src/main/java/org/maxkey/domain/UserInfo.java b/maxkey-core/src/main/java/org/maxkey/domain/UserInfo.java index 9eebc2f9..131b3388 100644 --- a/maxkey-core/src/main/java/org/maxkey/domain/UserInfo.java +++ b/maxkey-core/src/main/java/org/maxkey/domain/UserInfo.java @@ -10,10 +10,11 @@ import javax.persistence.Id; import javax.persistence.Table; import org.apache.mybatis.jpa.persistence.JpaBaseDomain; -import org.codehaus.jackson.annotate.JsonIgnore; import org.maxkey.util.StringUtils; import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.annotation.JsonIgnore; + /** * @author Crystal.Sea * diff --git a/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/BaseClientDetails.java b/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/BaseClientDetails.java index 436000f8..bd3ebba1 100644 --- a/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/BaseClientDetails.java +++ b/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/BaseClientDetails.java @@ -24,59 +24,43 @@ import org.springframework.util.StringUtils; * @author Dave Syer */ @SuppressWarnings("serial") -@org.codehaus.jackson.map.annotate.JsonSerialize(include = org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion.NON_DEFAULT) -@org.codehaus.jackson.annotate.JsonIgnoreProperties(ignoreUnknown = true) @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_DEFAULT) @com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true) public class BaseClientDetails implements ClientDetails { - @org.codehaus.jackson.annotate.JsonProperty("client_id") @com.fasterxml.jackson.annotation.JsonProperty("client_id") private String clientId; - @org.codehaus.jackson.annotate.JsonProperty("client_secret") @com.fasterxml.jackson.annotation.JsonProperty("client_secret") private String clientSecret; - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private Set scope = Collections.emptySet(); - @org.codehaus.jackson.annotate.JsonProperty("resource_ids") - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.annotation.JsonProperty("resource_ids") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private Set resourceIds = Collections.emptySet(); - @org.codehaus.jackson.annotate.JsonProperty("authorized_grant_types") - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.annotation.JsonProperty("authorized_grant_types") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private Set authorizedGrantTypes = Collections.emptySet(); - @org.codehaus.jackson.annotate.JsonProperty("redirect_uri") - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.annotation.JsonProperty("redirect_uri") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private Set registeredRedirectUris; - @org.codehaus.jackson.annotate.JsonProperty("autoapprove") - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.annotation.JsonProperty("autoapprove") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private Set autoApproveScopes; private List authorities = Collections.emptyList(); - @org.codehaus.jackson.annotate.JsonProperty("access_token_validity") @com.fasterxml.jackson.annotation.JsonProperty("access_token_validity") private Integer accessTokenValiditySeconds; - @org.codehaus.jackson.annotate.JsonProperty("refresh_token_validity") @com.fasterxml.jackson.annotation.JsonProperty("refresh_token_validity") private Integer refreshTokenValiditySeconds; - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore private Map additionalInformation = new LinkedHashMap(); @@ -154,7 +138,6 @@ public class BaseClientDetails implements ClientDetails { } } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public String getClientId() { return clientId; @@ -181,19 +164,16 @@ public class BaseClientDetails implements ClientDetails { return false; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Set getAutoApproveScopes() { return autoApproveScopes; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public boolean isSecretRequired() { return this.clientSecret != null; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public String getClientSecret() { return clientSecret; @@ -203,7 +183,6 @@ public class BaseClientDetails implements ClientDetails { this.clientSecret = clientSecret; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public boolean isScoped() { return this.scope != null && !this.scope.isEmpty(); @@ -218,7 +197,6 @@ public class BaseClientDetails implements ClientDetails { : new LinkedHashSet(scope); } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Set getResourceIds() { return resourceIds; @@ -229,7 +207,6 @@ public class BaseClientDetails implements ClientDetails { . emptySet() : new LinkedHashSet(resourceIds); } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Set getAuthorizedGrantTypes() { return authorizedGrantTypes; @@ -240,7 +217,6 @@ public class BaseClientDetails implements ClientDetails { authorizedGrantTypes); } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Set getRegisteredRedirectUri() { return registeredRedirectUris; @@ -251,15 +227,12 @@ public class BaseClientDetails implements ClientDetails { : new LinkedHashSet(registeredRedirectUris); } - @org.codehaus.jackson.annotate.JsonProperty("authorities") @com.fasterxml.jackson.annotation.JsonProperty("authorities") private List getAuthoritiesAsStrings() { return new ArrayList( AuthorityUtils.authorityListToSet(authorities)); } - @org.codehaus.jackson.annotate.JsonProperty("authorities") - @org.codehaus.jackson.map.annotate.JsonDeserialize(using = JacksonArrayOrStringDeserializer.class) @com.fasterxml.jackson.annotation.JsonProperty("authorities") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = Jackson2ArrayOrStringDeserializer.class) private void setAuthoritiesAsStrings(Set values) { @@ -267,20 +240,17 @@ public class BaseClientDetails implements ClientDetails { .toArray(new String[values.size()]))); } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Collection getAuthorities() { return authorities; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public void setAuthorities( Collection authorities) { this.authorities = new ArrayList(authorities); } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Integer getAccessTokenValiditySeconds() { return accessTokenValiditySeconds; @@ -290,7 +260,6 @@ public class BaseClientDetails implements ClientDetails { this.accessTokenValiditySeconds = accessTokenValiditySeconds; } - @org.codehaus.jackson.annotate.JsonIgnore @com.fasterxml.jackson.annotation.JsonIgnore public Integer getRefreshTokenValiditySeconds() { return refreshTokenValiditySeconds; @@ -306,13 +275,11 @@ public class BaseClientDetails implements ClientDetails { additionalInformation); } - @org.codehaus.jackson.annotate.JsonAnyGetter @com.fasterxml.jackson.annotation.JsonAnyGetter public Map getAdditionalInformation() { return Collections.unmodifiableMap(this.additionalInformation); } - @org.codehaus.jackson.annotate.JsonAnySetter @com.fasterxml.jackson.annotation.JsonAnySetter public void addAdditionalInformation(String key, Object value) { this.additionalInformation.put(key, value); diff --git a/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/JacksonArrayOrStringDeserializer.java b/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/JacksonArrayOrStringDeserializer.java deleted file mode 100644 index ceab6b7a..00000000 --- a/maxkey-core/src/main/java/org/maxkey/domain/apps/oauth2/provider/client/JacksonArrayOrStringDeserializer.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.maxkey.domain.apps.oauth2.provider.client; - -import java.io.IOException; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.Set; - -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.JsonToken; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.deser.std.StdDeserializer; -import org.codehaus.jackson.map.type.SimpleType; -import org.codehaus.jackson.type.JavaType; -import org.codehaus.jackson.type.TypeReference; -import org.springframework.util.StringUtils; - -public class JacksonArrayOrStringDeserializer extends StdDeserializer> { - - public JacksonArrayOrStringDeserializer() { - super(Set.class); - } - - @Override - public JavaType getValueType() { - return SimpleType.construct(String.class); - } - - @Override - public Set deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, - JsonProcessingException { - JsonToken token = jp.getCurrentToken(); - if (token.isScalarValue()) { - String list = jp.getText(); - list = list.replaceAll("\\s+", ","); - return new LinkedHashSet(Arrays.asList(StringUtils.commaDelimitedListToStringArray(list))); - } - return jp.readValueAs(new TypeReference>() { - }); - } -} \ No newline at end of file diff --git a/maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java b/maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java index 49e147d6..292681e5 100644 --- a/maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java +++ b/maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java @@ -3,12 +3,13 @@ package org.maxkey.json; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; import org.springframework.stereotype.Component; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + /** * 日期json序列化格式 * @author Crystal.Sea diff --git a/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java b/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java index de25e5cc..1e4f16a8 100644 --- a/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java +++ b/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java @@ -5,12 +5,13 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; import org.springframework.stereotype.Component; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + @Component public class JsonDateTimeDeserializer extends JsonDeserializer{ private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); diff --git a/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java b/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java index 1bc04a74..2b54ceb8 100644 --- a/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java +++ b/maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java @@ -3,12 +3,13 @@ package org.maxkey.json; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; import org.springframework.stereotype.Component; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + /** * 日期时间json序列化格式 * @author Crystal.Sea diff --git a/maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java b/maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java index 40897ccc..0f1f1c42 100644 --- a/maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java +++ b/maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java @@ -12,17 +12,18 @@ */ package org.maxkey.json; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + /** * JSON deserializer for Jackson to handle regular date instances as timestamps in ISO format. * diff --git a/maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java b/maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java index 01f1a214..474153f6 100644 --- a/maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java +++ b/maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java @@ -12,15 +12,16 @@ */ package org.maxkey.json; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + /** * JSON serializer for Jackson to handle regular date instances as timestamps in ISO format. * diff --git a/maxkey-core/src/main/java/org/maxkey/pretty/impl/JsonPretty.java b/maxkey-core/src/main/java/org/maxkey/pretty/impl/JsonPretty.java index feb180fe..b68aaecc 100644 --- a/maxkey-core/src/main/java/org/maxkey/pretty/impl/JsonPretty.java +++ b/maxkey-core/src/main/java/org/maxkey/pretty/impl/JsonPretty.java @@ -2,11 +2,11 @@ package org.maxkey.pretty.impl; import java.io.IOException; -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; import org.maxkey.pretty.Pretty; +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParser; diff --git a/maxkey-core/src/main/java/org/maxkey/util/JsonUtils.java b/maxkey-core/src/main/java/org/maxkey/util/JsonUtils.java index edbaf555..18b96fd8 100644 --- a/maxkey-core/src/main/java/org/maxkey/util/JsonUtils.java +++ b/maxkey-core/src/main/java/org/maxkey/util/JsonUtils.java @@ -2,14 +2,11 @@ package org.maxkey.util; import java.io.IOException; -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; - +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParser; public class JsonUtils { diff --git a/maxkey-dao/.settings/org.eclipse.jdt.core.prefs b/maxkey-dao/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/maxkey-dao/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/maxkey-dao/.settings/org.eclipse.wst.validation.prefs b/maxkey-dao/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 00000000..23e101c3 --- /dev/null +++ b/maxkey-dao/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,20 @@ +DELEGATES_PREFERENCE=delegateValidatorList +USER_BUILD_PREFERENCE=enabledBuildValidatorList +USER_MANUAL_PREFERENCE=enabledManualValidatorList +USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.800.v201904082137 +eclipse.preferences.version=1 +override=true +suspend=false +vals/org.eclipse.jst.jsf.facelet.ui.FaceletHTMLValidator/global=FF01 +vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01 +vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01 +vals/org.eclipse.wst.html.core.HTMLValidator/global=FF01 +vals/org.eclipse.wst.json.core.json/global=FF03 +vals/org.eclipse.wst.wsdl.validation.wsdl/global=FF02158org.eclipse.wst.wsdl.validation.internal.eclipse.Validator +vals/org.eclipse.wst.xml.core.xml/global=FF03 +vals/org.eclipse.wst.xsd.core.xsd/global=FF02162org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator +vals/org.eclipse.wst.xsl.core.xsl/global=FF02 +vf.version=3 diff --git a/maxkey-demos/.classpath b/maxkey-demos/.classpath deleted file mode 100644 index eb19361b..00000000 --- a/maxkey-demos/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-demos/.project b/maxkey-demos/.project deleted file mode 100644 index 60f1dc71..00000000 --- a/maxkey-demos/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - maxkey-demos - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index db76bc72..00000000 --- a/maxkey-demos/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/ -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature -project.path=\:maxkey-demos diff --git a/maxkey-demos/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-cas/.classpath b/maxkey-demos/maxkey-demo-cas/.classpath deleted file mode 100644 index 708b1a19..00000000 --- a/maxkey-demos/maxkey-demo-cas/.classpath +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-cas/.project b/maxkey-demos/maxkey-demo-cas/.project deleted file mode 100644 index 8ca5b801..00000000 --- a/maxkey-demos/maxkey-demo-cas/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-cas - maxkey-demo-cas - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 3b5470da..00000000 --- a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-cas diff --git a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 4cc9bdfa..00000000 --- a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-cas/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-cas/build.gradle b/maxkey-demos/maxkey-demo-cas/build.gradle deleted file mode 100644 index 251dbdd1..00000000 --- a/maxkey-demos/maxkey-demo-cas/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -description = "maxkey-demo-cas" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} - -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-cas' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-cas/lib/cas-client-core-3.2.1.jar b/maxkey-demos/maxkey-demo-cas/lib/cas-client-core-3.2.1.jar deleted file mode 100644 index 8fc3f3f5..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/lib/cas-client-core-3.2.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/lib/commons-codec-1.4.jar b/maxkey-demos/maxkey-demo-cas/lib/commons-codec-1.4.jar deleted file mode 100644 index 458d432d..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/lib/commons-codec-1.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/lib/commons-logging-1.1.1.jar b/maxkey-demos/maxkey-demo-cas/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/lib/slf4j-api-1.5.11.jar b/maxkey-demos/maxkey-demo-cas/lib/slf4j-api-1.5.11.jar deleted file mode 100644 index ccb8c724..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/lib/slf4j-api-1.5.11.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-cas/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-demos/maxkey-demo-cas/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-cas/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index be718be0..00000000 --- a/maxkey-demos/maxkey-demo-cas/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - org.jasig.cas.client.session.SingleSignOutHttpSessionListener - - - CAS Single Sign Out Filter - org.jasig.cas.client.session.SingleSignOutFilter - - - CAS Single Sign Out Filter - /index.jsp - - - CAS Filter - org.jasig.cas.client.authentication.AuthenticationFilter - - - casServerLoginUrl - >http://sso.maxkey.org/maxkey/authz/cas/ - - - - serverName - http://casdemo.maxkey.org/ - - - - CAS Filter - /index.jsp - - - - - CAS Validation Filter - org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter - - - casServerUrlPrefix - http://sso.maxkey.org/maxkey/authz/cas/ - - - - serverName - http://casdemo.maxkey.org/ - - - - CAS Validation Filter - /index.jsp - - - CAS HttpServletRequest Wrapper Filter - - org.jasig.cas.client.util.HttpServletRequestWrapperFilter - - - - CAS HttpServletRequest Wrapper Filter - /index.jsp - - - CAS Assertion Thread Local Filter - org.jasig.cas.client.util.AssertionThreadLocalFilter - - - CAS Assertion Thread Local Filter - /index.jsp - - - index.jsp - - \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/cas.png b/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/cas.png deleted file mode 100644 index 03d9dffc..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/cas.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/favicon.ico b/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/favicon.ico deleted file mode 100644 index 51f280f3..00000000 Binary files a/maxkey-demos/maxkey-demo-cas/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-cas/src/main/webapp/index.jsp deleted file mode 100644 index 97a25dd9..00000000 --- a/maxkey-demos/maxkey-demo-cas/src/main/webapp/index.jsp +++ /dev/null @@ -1,115 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="java.util.Map.Entry" %> -<%@ page language="java" import="org.apache.commons.codec.binary.Base64" %> -<%@ page language="java" import="org.jasig.cas.client.authentication.AttributePrincipal" %> -<%@ page language="java" import="org.jasig.cas.client.validation.Assertion" %> -<%@ page language="java" import="org.jasig.cas.client.util.AbstractCasFilter" %> -<% - String path = request.getContextPath(); - String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - System.out.println("CAS Assertion Success . "); - Assertion assertion = (Assertion) request.getSession().getAttribute(AbstractCasFilter.CONST_CAS_ASSERTION); - - - String username= assertion.getPrincipal().getName(); -%> - - - - - - - Demo CAS - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - <% - Map attMap = assertion.getPrincipal().getAttributes(); - for (Entry entry : attMap.entrySet()) { - String attributeValue=entry.getValue()==null?"":entry.getValue().toString(); - System.out.println("attributeValue : "+attributeValue); - if(attributeValue.startsWith("base64:")){ - attributeValue=new String(Base64.decodeBase64(attributeValue.substring("base64:".length())),"UTF-8"); - } - %> - - - - - <%}%> -
CAS Demo for MaxKey
CAS Logo
CAS Assertion<%=username %>
CAS Has Attributes <%=!assertion.getPrincipal().getAttributes().isEmpty() %> size : <%=assertion.getPrincipal().getAttributes().size() %>
CAS <%=entry.getKey() %> <%=attributeValue %>
-
- - diff --git a/maxkey-demos/maxkey-demo-cas/src/main/webapp/test.html b/maxkey-demos/maxkey-demo-cas/src/main/webapp/test.html deleted file mode 100644 index 5741816a..00000000 --- a/maxkey-demos/maxkey-demo-cas/src/main/webapp/test.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Demo CAS - - - - - - - - - - -
- - - - -
CAS Demo for MaxKey Test
-
- - diff --git a/maxkey-demos/maxkey-demo-jwt/.classpath b/maxkey-demos/maxkey-demo-jwt/.classpath deleted file mode 100644 index 2689c9ab..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.classpath +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-jwt/.externalToolBuilders/org.eclipse.wst.common.project.facet.core.builder (1).launch b/maxkey-demos/maxkey-demo-jwt/.externalToolBuilders/org.eclipse.wst.common.project.facet.core.builder (1).launch deleted file mode 100644 index c9bf5a59..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.externalToolBuilders/org.eclipse.wst.common.project.facet.core.builder (1).launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-jwt/.project b/maxkey-demos/maxkey-demo-jwt/.project deleted file mode 100644 index 883b8a7d..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-jwt - maxkey-demo-jwt - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 1fd37725..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-jwt diff --git a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.component deleted file mode 100644 index ddebad44..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-jwt/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-jwt/bin/main/jwk.jwks b/maxkey-demos/maxkey-demo-jwt/bin/main/jwk.jwks deleted file mode 100644 index f2fd67f0..00000000 --- a/maxkey-demos/maxkey-demo-jwt/bin/main/jwk.jwks +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keys": [ - { - "kty": "RSA", - "e": "AQAB", - "use": "sig", - "kid": "maxkey_rsa", - "alg": "RS256", - "n": "vyfZwQuBLNvJDhmziUCFuAfIv-bC6ivodcR6PfanTt8XLd6G63Yx10YChAdsDACjoLz1tEU56WPp_ee_vcTSsEZT3ouWJYghuGI2j4XclXlEj0S7DzdpcBBpI4n5dr8K3iKY-3JUMZR1AMBHI50UaMST9ZTZJAjUPIYxkhRdca5lWBo4wGUh1yj_80-Bq6al0ia9S5NTzNLaJ18jSxFqZ79BAkBm-KjkP248YUk6WBGtYEAV5Fws4dpse4hrqJ3RRHiMZV1o1iTmPHz_l55ZSDP3vpYf6iKqKzoK2RmdjfH5mGpbc4-PclTs4GKfwZ7cWfrny6B7sMnQfzujCH996Q" - } - ] -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-jwt/build.gradle b/maxkey-demos/maxkey-demo-jwt/build.gradle deleted file mode 100644 index e68124a1..00000000 --- a/maxkey-demos/maxkey-demo-jwt/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -description = "maxkey-demo-jwt" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-jwt' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-jwt/lib/commons-codec-1.9.jar b/maxkey-demos/maxkey-demo-jwt/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/commons-io-2.2.jar b/maxkey-demos/maxkey-demo-jwt/lib/commons-io-2.2.jar deleted file mode 100644 index 84ca5658..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/commons-io-2.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/commons-logging-1.1.1.jar b/maxkey-demos/maxkey-demo-jwt/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/gson-2.2.4.jar b/maxkey-demos/maxkey-demo-jwt/lib/gson-2.2.4.jar deleted file mode 100644 index 9478253e..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/gson-2.2.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/json-smart-1.2.jar b/maxkey-demos/maxkey-demo-jwt/lib/json-smart-1.2.jar deleted file mode 100644 index 6e4ffd83..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/json-smart-1.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/log4j-1.2.17.jar b/maxkey-demos/maxkey-demo-jwt/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf7..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/maxkey-client-sdk.jar b/maxkey-demos/maxkey-demo-jwt/lib/maxkey-client-sdk.jar deleted file mode 100644 index 9d47e56e..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/maxkey-client-sdk.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/lib/maxkey-jose-jwt.jar b/maxkey-demos/maxkey-demo-jwt/lib/maxkey-jose-jwt.jar deleted file mode 100644 index 7ce8a6ba..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/lib/maxkey-jose-jwt.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/src/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-jwt/src/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/resources/jwk.jwks b/maxkey-demos/maxkey-demo-jwt/src/main/resources/jwk.jwks deleted file mode 100644 index f2fd67f0..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/main/resources/jwk.jwks +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keys": [ - { - "kty": "RSA", - "e": "AQAB", - "use": "sig", - "kid": "maxkey_rsa", - "alg": "RS256", - "n": "vyfZwQuBLNvJDhmziUCFuAfIv-bC6ivodcR6PfanTt8XLd6G63Yx10YChAdsDACjoLz1tEU56WPp_ee_vcTSsEZT3ouWJYghuGI2j4XclXlEj0S7DzdpcBBpI4n5dr8K3iKY-3JUMZR1AMBHI50UaMST9ZTZJAjUPIYxkhRdca5lWBo4wGUh1yj_80-Bq6al0ia9S5NTzNLaJ18jSxFqZ79BAkBm-KjkP248YUk6WBGtYEAV5Fws4dpse4hrqJ3RRHiMZV1o1iTmPHz_l55ZSDP3vpYf6iKqKzoK2RmdjfH5mGpbc4-PclTs4GKfwZ7cWfrny6B7sMnQfzujCH996Q" - } - ] -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e5dce624..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - index.jsp - - \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/favicon.ico b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/favicon.ico deleted file mode 100644 index 51f280f3..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/jwt.png b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/jwt.png deleted file mode 100644 index 4754dbac..00000000 Binary files a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/images/jwt.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/index.jsp deleted file mode 100644 index aa01f0ab..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/index.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - - -%> - - - - - - - My JSP 'index.jsp' starting page - - - - - - - - - - oauth 1.0a sso
- oauth 2.0 sso - - diff --git a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/jwtcallback.jsp b/maxkey-demos/maxkey-demo-jwt/src/main/webapp/jwtcallback.jsp deleted file mode 100644 index 2a1c521f..00000000 --- a/maxkey-demos/maxkey-demo-jwt/src/main/webapp/jwtcallback.jsp +++ /dev/null @@ -1,153 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.api.ConnsecApi20" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.*" %> -<%@ page language="java" import="org.maxkey.client.utils.*" %> -<%@ page language="java" import="com.nimbusds.jwt.JWTClaimsSet" %> -<%@ page language="java" import="com.nimbusds.jose.*" %> -<%@ page language="java" import="com.nimbusds.jwt.*" %> -<%@ page language="java" import="com.connsec.oidc.jose.keystore.*" %> -<%@ page language="java" import="com.nimbusds.jose.jwk.*" %> -<%@ page language="java" import="java.io.File" %> -<%@ page language="java" import="com.nimbusds.jose.crypto.*" %> -<%@ page language="java" import="com.google.gson.*" %> - - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -String token=request.getParameter("jwt"); -System.out.println("jwt "+token); -SignedJWT signedJWT=null; - -//JWKSetKeyStore jwkSetKeyStore=new JWKSetKeyStore(); - -File jwksFile=new File(PathUtils.getInstance().getClassPath()+"jwk.jwks"); -JWKSet jwkSet=JWKSet.load(jwksFile); - -RSASSAVerifier rsaSSAVerifier = new RSASSAVerifier(((RSAKey) jwkSet.getKeyByKeyId("maxkey_rsa")).toRSAPublicKey()); -try { - - signedJWT = SignedJWT.parse(token); -} catch (java.text.ParseException e) { - // Invalid signed JWT encoding -} - -System.out.println("signedJWT "+signedJWT); - -JWTClaimsSet jwtClaims =signedJWT.getJWTClaimsSet(); - -%> - - - - - - - JWT 1.0 Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JSON Web Token (JWT) 1.0 Demo
JWT 1.0 Logo
Issuer<%=jwtClaims.getIssuer() %>
Subject<%=jwtClaims.getSubject()%>
Audience<%=jwtClaims.getAudience() %>
ExpirationTime<%=jwtClaims.getExpirationTime() %>
JWTID<%=jwtClaims.getJWTID() %>
IssueTime<%=jwtClaims.getIssueTime() %>
JWTClaims<%=signedJWT.getPayload() %>
Verify<%=signedJWT.verify(rsaSSAVerifier) %>
-
- - diff --git a/maxkey-demos/maxkey-demo-ltpa/.classpath b/maxkey-demos/maxkey-demo-ltpa/.classpath deleted file mode 100644 index 708b1a19..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.classpath +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-ltpa/.project b/maxkey-demos/maxkey-demo-ltpa/.project deleted file mode 100644 index 56f3f11f..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-ltpa - maxkey-demo-ltpa - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 0583fb1d..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-ltpa diff --git a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 17420b27..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-ltpa/build.gradle b/maxkey-demos/maxkey-demo-ltpa/build.gradle deleted file mode 100644 index 4f542878..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -description = "maxkey-demo-ltpa" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-ltpa' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-ltpa/lib/commons-codec-1.9.jar b/maxkey-demos/maxkey-demo-ltpa/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/lib/commons-logging-1.1.1.jar b/maxkey-demos/maxkey-demo-ltpa/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/lib/gson-2.2.4.jar b/maxkey-demos/maxkey-demo-ltpa/lib/gson-2.2.4.jar deleted file mode 100644 index 9478253e..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/lib/gson-2.2.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/lib/log4j-1.2.17.jar b/maxkey-demos/maxkey-demo-ltpa/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf7..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/lib/maxkey-client-sdk.jar b/maxkey-demos/maxkey-demo-ltpa/lib/maxkey-client-sdk.jar deleted file mode 100644 index ce5799f0..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/lib/maxkey-client-sdk.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/src/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-ltpa/src/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 16d4d820..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - index.jsp - - diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/favicon.ico b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/favicon.ico deleted file mode 100644 index 51f280f3..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/ltpa.png b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/ltpa.png deleted file mode 100644 index 578d8267..00000000 Binary files a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/images/ltpa.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/index.jsp deleted file mode 100644 index 2e5583b9..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/index.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -%> - - - - - - - My JSP 'index.jsp' starting page - - - - - - - - - - This is my JSP page.
- - diff --git a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/ltpa.jsp b/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/ltpa.jsp deleted file mode 100644 index c4dd5999..00000000 --- a/maxkey-demos/maxkey-demo-ltpa/src/main/webapp/ltpa.jsp +++ /dev/null @@ -1,120 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.ltpa.*"%> -<%@ page language="java" import="org.maxkey.client.crypto.*"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -String ltpaVaule=LtpaUtils.readLtpa(request, "connsec.com", "ltpa"); -System.out.println("============"+ltpaVaule); -Map tokenMap=null; -if(ltpaVaule!=null){ - String ltpaString=LtpaUtils.decode(ltpaVaule, "h560BIVz", ReciprocalUtils.Algorithm.DES); - tokenMap=LtpaUtils.parseLtpaJson(ltpaString); -} - -// - -%> - - - - - - - LTPA Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LTPA Demo
LTPA Logo
UID<%=tokenMap.get("uid") %>
UserName<%=tokenMap.get("username") %>
Department<%=tokenMap.get("department") %>
Email<%=tokenMap.get("email") %>
Authentication at Time<%=tokenMap.get("at")%>
Expires<%=tokenMap.get("expires")%>
-
- - diff --git a/maxkey-demos/maxkey-demo-oauth/.classpath b/maxkey-demos/maxkey-demo-oauth/.classpath deleted file mode 100644 index 2689c9ab..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.classpath +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-oauth/.project b/maxkey-demos/maxkey-demo-oauth/.project deleted file mode 100644 index 84fab2d4..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-oauth - maxkey-demo-oauth - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 475bc63a..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-oauth diff --git a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 3cfc2971..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-oauth/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-oauth/bin/main/jwk.jwks b/maxkey-demos/maxkey-demo-oauth/bin/main/jwk.jwks deleted file mode 100644 index d78d95ca..00000000 --- a/maxkey-demos/maxkey-demo-oauth/bin/main/jwk.jwks +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keys": [ - { - "e": "AQAB", - "n": "h5xtDWLssoj5-WLCKPYPUDJlM5pnL4pS8-wMt9sVA57QVRVFdpWHi1dbDCugCApjvmD-giO5yjF5mQSTAF6a14FvktozVw_dDTEzrjG5FgT6WpMzMZd6JpiwQLOtEbV7oBkKYWm1vh1C67-xTlhKgQUNLVNDg4RqRcKFxZd5JPc", - "kty": "RSA", - "use": "sig", - "alg": "RS256", - "kid": "connsec_rsa" - } - ] -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/build.gradle b/maxkey-demos/maxkey-demo-oauth/build.gradle deleted file mode 100644 index c4cf3265..00000000 --- a/maxkey-demos/maxkey-demo-oauth/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -description = "maxkey-demo-oauth" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-oauth' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/lib/commons-codec-1.9.jar b/maxkey-demos/maxkey-demo-oauth/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/commons-io-2.2.jar b/maxkey-demos/maxkey-demo-oauth/lib/commons-io-2.2.jar deleted file mode 100644 index 84ca5658..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/commons-io-2.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/commons-logging-1.1.1.jar b/maxkey-demos/maxkey-demo-oauth/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/connsec-oidc.jar b/maxkey-demos/maxkey-demo-oauth/lib/connsec-oidc.jar deleted file mode 100644 index 3d4fe71c..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/connsec-oidc.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/gson-2.2.4.jar b/maxkey-demos/maxkey-demo-oauth/lib/gson-2.2.4.jar deleted file mode 100644 index 9478253e..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/gson-2.2.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/json-smart-1.2.jar b/maxkey-demos/maxkey-demo-oauth/lib/json-smart-1.2.jar deleted file mode 100644 index 6e4ffd83..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/json-smart-1.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/log4j-1.2.17.jar b/maxkey-demos/maxkey-demo-oauth/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf7..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/maxkey-client-sdk.jar b/maxkey-demos/maxkey-demo-oauth/lib/maxkey-client-sdk.jar deleted file mode 100644 index ce5799f0..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/maxkey-client-sdk.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/lib/nimbus-jose-jwt-3.5.jar b/maxkey-demos/maxkey-demo-oauth/lib/nimbus-jose-jwt-3.5.jar deleted file mode 100644 index 50adacc0..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/lib/nimbus-jose-jwt-3.5.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-oauth/src/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-oauth/src/jwk.jwks b/maxkey-demos/maxkey-demo-oauth/src/jwk.jwks deleted file mode 100644 index d78d95ca..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/jwk.jwks +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keys": [ - { - "e": "AQAB", - "n": "h5xtDWLssoj5-WLCKPYPUDJlM5pnL4pS8-wMt9sVA57QVRVFdpWHi1dbDCugCApjvmD-giO5yjF5mQSTAF6a14FvktozVw_dDTEzrjG5FgT6WpMzMZd6JpiwQLOtEbV7oBkKYWm1vh1C67-xTlhKgQUNLVNDg4RqRcKFxZd5JPc", - "kty": "RSA", - "use": "sig", - "alg": "RS256", - "kid": "connsec_rsa" - } - ] -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/java/org/maxkey/demo/oauth/OAuthDemo.java b/maxkey-demos/maxkey-demo-oauth/src/main/java/org/maxkey/demo/oauth/OAuthDemo.java deleted file mode 100644 index 6a9be217..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/java/org/maxkey/demo/oauth/OAuthDemo.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.maxkey.demo.oauth; - -public class OAuthDemo { - - public OAuthDemo() { - // TODO Auto-generated constructor stub - } - -} diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/resources/jwk.jwks b/maxkey-demos/maxkey-demo-oauth/src/main/resources/jwk.jwks deleted file mode 100644 index d78d95ca..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/resources/jwk.jwks +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keys": [ - { - "e": "AQAB", - "n": "h5xtDWLssoj5-WLCKPYPUDJlM5pnL4pS8-wMt9sVA57QVRVFdpWHi1dbDCugCApjvmD-giO5yjF5mQSTAF6a14FvktozVw_dDTEzrjG5FgT6WpMzMZd6JpiwQLOtEbV7oBkKYWm1vh1C67-xTlhKgQUNLVNDg4RqRcKFxZd5JPc", - "kty": "RSA", - "use": "sig", - "alg": "RS256", - "kid": "connsec_rsa" - } - ] -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e5dce624..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - index.jsp - - \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/callback.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/callback.jsp deleted file mode 100644 index a64d98b8..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/callback.jsp +++ /dev/null @@ -1,126 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.domain.*" %> - - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -OAuthService service = (OAuthService)request.getSession().getAttribute("oauthv10aservice"); -Verifier verifier = new Verifier(request.getParameter("oauth_verifier")); -Token requestToken = (Token)request.getSession().getAttribute("requestToken"); -Token accessToken = service.getAccessToken(requestToken, verifier); - - -System.out.println("================================"); -OAuthClient restClient=new OAuthClient("http://login.connsec.com/maxkey/api/oauth/v10a/me"); - - UserInfo userInfo=restClient.getUserInfo(accessToken.getAccess_token()); - -%> - - - - - - - OAuth V1.0a Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OAuth V1.0a Demo
OAuth V1.0a Logo
Login<%=userInfo.getUsername() %>
DisplayName<%=userInfo.getDisplayName() %>
Department<%=userInfo.getDepartment() %>
JobTitle<%=userInfo.getJobTitle() %>
email<%=userInfo.getEmail() %>
ResponseString<%=userInfo.getResponseString() %>
-
- - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/favicon.ico b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/favicon.ico deleted file mode 100644 index 51f280f3..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth-2-sm.png b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth-2-sm.png deleted file mode 100644 index 41a8d35a..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth-2-sm.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth10.jpg b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth10.jpg deleted file mode 100644 index 8fbc4c1a..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/oauth10.jpg and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/openid.png b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/openid.png deleted file mode 100644 index fab4af0c..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/openid.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/qq.png b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/qq.png deleted file mode 100644 index ac961d47..00000000 Binary files a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/images/qq.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/index.jsp deleted file mode 100644 index aa01f0ab..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/index.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - - -%> - - - - - - - My JSP 'index.jsp' starting page - - - - - - - - - - oauth 1.0a sso
- oauth 2.0 sso - - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback.jsp deleted file mode 100644 index cb099e3c..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback.jsp +++ /dev/null @@ -1,136 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.api.ConnsecApi20" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.domain.*" %> - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -OAuthService service = (OAuthService)request.getSession().getAttribute("oauthv20service"); - -if(service==null){ - String callback="http://oauthdemo.maxkey.org:8080/oauthdemo/oauth20callback.jsp"; - service = new ServiceBuilder() - .provider(ConnsecApi20.class) - .apiKey("b32834accb544ea7a9a09dcae4a36403") - .apiSecret("E9UO53P3JH52aQAcnLP2FlLv8olKIB7u") - .callback(callback) - .build(); -} - -Token EMPTY_TOKEN = null; -Verifier verifier = new Verifier(request.getParameter("code")); -Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier); - -OAuthClient restClient=new OAuthClient("http://login.connsec.com/maxkey/api/oauth/v20/me"); - - UserInfo userInfo=restClient.getUserInfo(accessToken.getAccess_token()); - - -%> - - - - - - - OAuth V2.0 Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OAuth V2.0 Demo
OAuth V2.0 Logo
Login<%=userInfo.getUsername() %>
DisplayName<%=userInfo.getDisplayName() %>
Department<%=userInfo.getDepartment() %>
JobTitle<%=userInfo.getJobTitle() %>
email<%=userInfo.getEmail() %>
ResponseString<%=userInfo.getResponseString() %>
-
- - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback2.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback2.jsp deleted file mode 100644 index aa86eb22..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20callback2.jsp +++ /dev/null @@ -1,118 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.api.ConnsecApi20" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.*" %> -<%@ page language="java" import="org.maxkey.client.web.authn.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.domain.*" %> - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - - -UserInfo userInfo=(UserInfo)session.getAttribute(AuthenticationFilter.CONST_CONNSEC_USERINFO); - -%> - - - - - - - OAuth V2.0 Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OAuth V2.0 Demo
descriptionAuthenticationFilter for ConnSec IAM
OAuth V2.0 Logo
Login<%=userInfo.getUsername() %>
DisplayName<%=userInfo.getDisplayName() %>
Department<%=userInfo.getDepartment() %>
JobTitle<%=userInfo.getJobTitle() %>
email<%=userInfo.getEmail() %>
-
- - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20index.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20index.jsp deleted file mode 100644 index f5a00edc..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oauth20index.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.api.ConnsecApi20" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.Token" %> - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+path+"/"; - -String callback="http://oauthdemo.maxkey.org:8080/oauthdemo/oauth20callback.jsp"; -OAuthService service = new ServiceBuilder() - .provider(ConnsecApi20.class) - .apiKey("b32834accb544ea7a9a09dcae4a36403") - .apiSecret("E9UO53P3JH52aQAcnLP2FlLv8olKIB7u") - .callback(callback) - .build(); -Token EMPTY_TOKEN = null; -String authorizationUrl = service.getAuthorizationUrl(EMPTY_TOKEN); - -request.getSession().setAttribute("oauthv20service", service); - -%> - - - - - - - My JSP 'index.jsp' starting page - - - - - - - - - - oauth 2.0 sso - - diff --git a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oidc10callback.jsp b/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oidc10callback.jsp deleted file mode 100644 index cfb5cea6..00000000 --- a/maxkey-demos/maxkey-demo-oauth/src/main/webapp/oidc10callback.jsp +++ /dev/null @@ -1,177 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.oauth.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.builder.api.ConnsecApi20" %> -<%@ page language="java" import="org.maxkey.client.oauth.model.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.*" %> -<%@ page language="java" import="org.maxkey.client.oauth.domain.*" %> -<%@ page language="java" import="org.maxkey.client.utils.*" %> -<%@ page language="java" import="com.nimbusds.jwt.JWTClaimsSet" %> -<%@ page language="java" import="com.nimbusds.jose.*" %> -<%@ page language="java" import="com.nimbusds.jwt.*" %> -<%@ page language="java" import="com.connsec.oidc.jose.keystore.*" %> -<%@ page language="java" import="com.nimbusds.jose.jwk.*" %> -<%@ page language="java" import="java.io.File" %> -<%@ page language="java" import="com.nimbusds.jose.crypto.*" %> -<%@ page language="java" import="com.google.gson.*" %> - - - -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -OAuthService service = (OAuthService)request.getSession().getAttribute("oauthv20service"); - -if(service==null){ - String callback="http://oauthdemo.maxkey.org:8080/oauthdemo/oidc10callback.jsp"; - service = new ServiceBuilder() - .provider(ConnsecApi20.class) - .apiKey("ae20330a-ef0b-4dad-9f10-d5e3485ca2ad") - .apiSecret("JQygMDgwMTIwMTUyMjU5NTgyNTc2RD") - .callback(callback) - .build(); -} - -Token EMPTY_TOKEN = null; -Verifier verifier = new Verifier(request.getParameter("code")); -Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier); - -//JWTClaimsSet idClaims = JWTClaimsSet.parse(accessToken.getId_token()); -SignedJWT signedJWT=null; - -//JWKSetKeyStore jwkSetKeyStore=new JWKSetKeyStore(); - -File jwksFile=new File(PathUtils.getInstance().getClassPath()+"jwk.jwks"); -JWKSet jwkSet=JWKSet.load(jwksFile); - -RSASSAVerifier rsaSSAVerifier = new RSASSAVerifier(((RSAKey) jwkSet.getKeyByKeyId("connsec_rsa")).toRSAPublicKey()); -try { - signedJWT = SignedJWT.parse(accessToken.getId_token()); -} catch (java.text.ParseException e) { - // Invalid signed JWT encoding -} -; - -OAuthClient restClient=new OAuthClient("http://login.connsec.com/maxkey/api/connect/v10/userinfo",accessToken.getToken()); - - OIDCUserInfo userInfo=restClient.getOIDCUserInfo(accessToken.getToken()); - - -%> - - - - - - - OpenID Connect 1.0 Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OpenID Connect 1.0 Demo
OpenID Connect 1.0 Logo
Login<%=userInfo.getSub() %>
DisplayName<%=userInfo.getName()%>
Department<%=userInfo.getGender() %>
email<%=userInfo.getEmail() %>
ResponseString<%=userInfo.getResponseString() %>
Id_token<%=accessToken.getId_token() %>
Issuer<%=signedJWT.getJWTClaimsSet().getIssuer() %>
JWTClaims<%=signedJWT.getPayload() %>
Verify<%=signedJWT.verify(rsaSSAVerifier) %>
-
- - diff --git a/maxkey-demos/maxkey-demo-saml/.classpath b/maxkey-demos/maxkey-demo-saml/.classpath deleted file mode 100644 index 1501fbb1..00000000 --- a/maxkey-demos/maxkey-demo-saml/.classpath +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/.project b/maxkey-demos/maxkey-demo-saml/.project deleted file mode 100644 index 74e945c4..00000000 --- a/maxkey-demos/maxkey-demo-saml/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-saml - maxkey-demo-saml - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 60faa878..00000000 --- a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-saml diff --git a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 25466955..00000000 --- a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-saml/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/application.properties b/maxkey-demos/maxkey-demo-saml/bin/main/application.properties deleted file mode 100644 index 681a73b8..00000000 --- a/maxkey-demos/maxkey-demo-saml/bin/main/application.properties +++ /dev/null @@ -1,66 +0,0 @@ -ISSUING_ENTITY_ID=saml2sp - -WEB_APPLICATION_CHANNEL=http -WEB_APPLICATION_HOST_AND_PORT=saml.connsec.com -WEB_APPLICATION_CONTEXT_PATH=/saml2sp - - -ASSERTION_CONSUMER_URI=/index -ASSERTION_CONSUMER_URL=${WEB_APPLICATION_CHANNEL}://${WEB_APPLICATION_HOST_AND_PORT}${WEB_APPLICATION_CONTEXT_PATH}${ASSERTION_CONSUMER_URI} - -MAX_PARSER_POOL_SIZE=2 - -IDP_SSO_SERVICE_URL=http\://login.connsec.com/sec/authorize/saml20/ce8b08e9-b884-4d1f-a795-01ae25f63d48 - - -REPLAY_CACHE_LIFE_IN_MILLIS=14400000 -ISSUE_INSTANT_CHECK_CLOCK_SKEW_IN_SECONDS=600 -ISSUE_INSTANT_CHECK_VALIDITY_TIME_IN_SECONDS=600 - -KEYSTORE_PASSWORD=secret -KESTORE_PRIVATE_KEY_PASSWORD=secret -keyStoreFile=classpath:saml2sp.jks -#The b64 encoded keystore MUST have a private key with an alias of $ISSUING_ENTITY_ID -B64_ENCODED_KEYSTORE=/u3+7QAAAAIAAAACAAAAAQACc3AAAAErlmk7hAAAArowggK2MA4GCisGAQQBKgIRAQEFAASCAqIw4jynaKwOlOP74OM2+0lnYX8MOhvk0r71kvcbv9cusyIua3FJaIg1NBmgDrvF2JcUNcAhnyuBrafzW+3INGs8NNnmsPNgSPQ5cIMKRZ+44xxEmafy+FYPgw5RlmL+gXB/buiK1FzVuukjCR7/GCbQB2T0I1bZn5Ok/U0AlfGnAGBcXOR3efjdtKKImPBtMHQ9kBoCIlgROVKPEcSxPi7fm2SlN+tVjv1y9toYw2wRP+zsW5CAfY2mnRkQg58BtE2LhYhedSUUuaJAWTlWaWqA9rbTZmXlYqqOB/t86aYNuadT8nAu468MIucL3F2RQdMt9xDD3qRidT+h1I7ShnaF7pkUvynE5QKW3EIPhTaiRvMSUf6a984G4WerpdgmbzYEHUC9Kfw6WHcgKcGB5oAg4R2nlyEGLd2SBFv2vMRnXucwuofECK15YqCbu6wZGhQDKiGZo8MNcu8mPCq7vujOl4Azkjx1YyU1VHTQTyHP9BoOqS4lA8SjdEEGOm6p3R+CrwRratgET0UlopMInxuIvnuxXp5Vq4fHuY0GI65MRVQt9mSp5zeYvAYPYLSPmhcE2KchIR1Cb7NPbPID8D/EkNuCxG9FNPBhhtgMRdbOejJ3NPpt43DDt3nTpn/5pgBLsBxQ7hlPOb3Y4hsKCEI4UyVl+fTQieNIyEaAnt2Q/NNVGDJlc4aIAdDEfbOVbVdyYDViHskwTiKDdin4mAqTGj+qr0MVpoye6daZduftG85yx/1AnEjvPqUhKvi1kMKBi6q3z6XUMIq09RaQepx6xMboaiiqCU+Bi9kvdh3XNbnQ64DNPOhzytLAiBApb2IRaY1fkKSYOz+hFj0HbxF1cn5ITaQT1KeestiS+PuBO8JUR1yxTU0JQ4Tea0quTB+ragAAAAEABVguNTA5AAACSjCCAkYwggGvAgRMscTWMA0GCSqGSIb3DQEBBQUAMGoxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMxGTAXBgNVBAoMEFNlcnZpY2UgUHJvdmlkZXIxCzAJBgNVBAsMAnNwMQ0wCwYDVQQDDARqY294MB4XDTEwMTAxMDEzNTExOFoXDTIwMTAwNzEzNTExOFowajEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJVUzEZMBcGA1UECgwQU2VydmljZSBQcm92aWRlcjELMAkGA1UECwwCc3AxDTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIvtAFv5pWA6oRlLz/JhEG1Y7+6Wcvc2aU4rAH4PdWlmr5YkpA/gEd/J25AilVIE+c8nQwIzn5rDgJFGoBfjN/jUkKWLcB5jZC8SFzEx5zvGnR9wWgnbBL+jWQTal8M10ilhbRfklYLpkyTrwYWQdpDmMqVrN9wbNgU2imTihooNAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAdwn3tIk3612PRNtkxcuW/O5MKQyoy6KTS7V95KklJX452zebWDeM6/dR+XWVJLhRfN8+87cyos5HMYjIFVUJFNl9W5+UnRK75ku2hHBvPuU3ZTuW3/vGrNOLuaroPqELp+bNbfZkr2hezpeQl/4JKRFE418dvJJXW2OxE4A1K0sAAAACAANpZHAAAAErlm6iEQAFWC41MDkAAAJOMIICSjCCAbMCBEyxxXgwDQYJKoZIhvcNAQEFBQAwbDEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJVUzEaMBgGA1UECgwRSWRlbnRpdHkgUHJvdmlkZXIxDDAKBgNVBAsMA2lkcDENMAsGA1UEAwwEamNveDAeFw0xMDEwMTAxMzU0MDBaFw0yMDEwMDcxMzU0MDBaMGwxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMxGjAYBgNVBAoMEUlkZW50aXR5IFByb3ZpZGVyMQwwCgYDVQQLDANpZHAxDTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIt33orAL6MajhA8jeXaf8aPbIX24dlv0HwBBmdLBzkrO0I3bELtKSzbKFBkIwQZKaFHYdT7cxmy1epwffYsX2Ipguz99wGgH92GiWCLuPr14HqMAz/wx/1pAFFERa5rxadq0Jxmk1SF8gdz7FtoQOT0WUnIcs20yXta0Abqd1AxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAOCsgCB7zc/OrY8u54nUb2apJEZ20sSO48ilzn5PoGBQxFZJIg0E0eBTfCTNGQuF5anI4NZ7Q0gTRT8IBxeiPhksz+5NG4eCb6+4VyKJszx6rY7S6uq/08N3EMru5jyNVEn/o3F1QpwtlMDipH8s+dpuR6sEAcpugQYBH6F1MfI1iptlkKubwxS31ebaol0N4M5BFyA\=\= -AQEFAASCAqIw4jynaKwOlOP74OM2+0lnYX8MOhvk0r71kvcbv9cusyIua3FJaIg1\ -NBmgDrvF2JcUNcAhnyuBrafzW+3INGs8NNnmsPNgSPQ5cIMKRZ+44xxEmafy+FYP\ -gw5RlmL+gXB/buiK1FzVuukjCR7/GCbQB2T0I1bZn5Ok/U0AlfGnAGBcXOR3efjd\ -tKKImPBtMHQ9kBoCIlgROVKPEcSxPi7fm2SlN+tVjv1y9toYw2wRP+zsW5CAfY2m\ -nRkQg58BtE2LhYhedSUUuaJAWTlWaWqA9rbTZmXlYqqOB/t86aYNuadT8nAu468M\ -IucL3F2RQdMt9xDD3qRidT+h1I7ShnaF7pkUvynE5QKW3EIPhTaiRvMSUf6a984G\ -4WerpdgmbzYEHUC9Kfw6WHcgKcGB5oAg4R2nlyEGLd2SBFv2vMRnXucwuofECK15\ -YqCbu6wZGhQDKiGZo8MNcu8mPCq7vujOl4Azkjx1YyU1VHTQTyHP9BoOqS4lA8Sj\ -dEEGOm6p3R+CrwRratgET0UlopMInxuIvnuxXp5Vq4fHuY0GI65MRVQt9mSp5zeY\ -vAYPYLSPmhcE2KchIR1Cb7NPbPID8D/EkNuCxG9FNPBhhtgMRdbOejJ3NPpt43DD\ -t3nTpn/5pgBLsBxQ7hlPOb3Y4hsKCEI4UyVl+fTQieNIyEaAnt2Q/NNVGDJlc4aI\ -AdDEfbOVbVdyYDViHskwTiKDdin4mAqTGj+qr0MVpoye6daZduftG85yx/1AnEjv\ -PqUhKvi1kMKBi6q3z6XUMIq09RaQepx6xMboaiiqCU+Bi9kvdh3XNbnQ64DNPOhz\ -ytLAiBApb2IRaY1fkKSYOz+hFj0HbxF1cn5ITaQT1KeestiS+PuBO8JUR1yxTU0J\ -Q4Tea0quTB+ragAAAAEABVguNTA5AAACSjCCAkYwggGvAgRMscTWMA0GCSqGSIb3\ -DQEBBQUAMGoxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTEL\ -MAkGA1UEBhMCVVMxGTAXBgNVBAoMEFNlcnZpY2UgUHJvdmlkZXIxCzAJBgNVBAsM\ -AnNwMQ0wCwYDVQQDDARqY294MB4XDTEwMTAxMDEzNTExOFoXDTIwMTAwNzEzNTEx\ -OFowajEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYD\ -VQQGEwJVUzEZMBcGA1UECgwQU2VydmljZSBQcm92aWRlcjELMAkGA1UECwwCc3Ax\ -DTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIvtAFv5\ -pWA6oRlLz/JhEG1Y7+6Wcvc2aU4rAH4PdWlmr5YkpA/gEd/J25AilVIE+c8nQwIz\ -n5rDgJFGoBfjN/jUkKWLcB5jZC8SFzEx5zvGnR9wWgnbBL+jWQTal8M10ilhbRfk\ -lYLpkyTrwYWQdpDmMqVrN9wbNgU2imTihooNAgMBAAEwDQYJKoZIhvcNAQEFBQAD\ -gYEAdwn3tIk3612PRNtkxcuW/O5MKQyoy6KTS7V95KklJX452zebWDeM6/dR+XWV\ -JLhRfN8+87cyos5HMYjIFVUJFNl9W5+UnRK75ku2hHBvPuU3ZTuW3/vGrNOLuaro\ -PqELp+bNbfZkr2hezpeQl/4JKRFE418dvJJXW2OxE4A1K0sAAAACAANpZHAAAAEr\ -lm6iEQAFWC41MDkAAAJOMIICSjCCAbMCBEyxxXgwDQYJKoZIhvcNAQEFBQAwbDEk\ -MCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJV\ -UzEaMBgGA1UECgwRSWRlbnRpdHkgUHJvdmlkZXIxDDAKBgNVBAsMA2lkcDENMAsG\ -A1UEAwwEamNveDAeFw0xMDEwMTAxMzU0MDBaFw0yMDEwMDcxMzU0MDBaMGwxJDAi\ -BgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMx\ -GjAYBgNVBAoMEUlkZW50aXR5IFByb3ZpZGVyMQwwCgYDVQQLDANpZHAxDTALBgNV\ -BAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIt33orAL6MajhA8\ -jeXaf8aPbIX24dlv0HwBBmdLBzkrO0I3bELtKSzbKFBkIwQZKaFHYdT7cxmy1epw\ -ffYsX2Ipguz99wGgH92GiWCLuPr14HqMAz/wx/1pAFFERa5rxadq0Jxmk1SF8gdz\ -7FtoQOT0WUnIcs20yXta0Abqd1AxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAOCsg\ -CB7zc/OrY8u54nUb2apJEZ20sSO48ilzn5PoGBQxFZJIg0E0eBTfCTNGQuF5anI4\ -NZ7Q0gTRT8IBxeiPhksz+5NG4eCb6+4VyKJszx6rY7S6uq/08N3EMru5jyNVEn/o\ -3F1QpwtlMDipH8s+dpuR6sEAcpugQYBH6F1MfI1iptlkKubwxS31ebaol0N4M5BF\ -yA== - diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/log4j.properties b/maxkey-demos/maxkey-demo-saml/bin/main/log4j.properties deleted file mode 100644 index e351e411..00000000 --- a/maxkey-demos/maxkey-demo-saml/bin/main/log4j.properties +++ /dev/null @@ -1,48 +0,0 @@ -# General Log Settings -#log4j.rootLogger=INFO,LOGFILE,stdout -log4j.rootLogger=INFO,LOGFILE,stdout - -#appender config:stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%c:%p %X %L] %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-d{HH:mm:ss.SSS} [%c:%p %X{$UserName$} %L] %m%n - -#appender config:LOGFILE -# log file arrcoss file size -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.LOGFILE.DatePattern=.yyyy-MM-dd -log4j.appender.LOGFILE.File=${catalina.home}/logs/connsec-saml2sp-out.log -log4j.appender.LOGFILE.maxFileSize=2048KB -log4j.appender.LOGFILE.MaxBackupIndex = 5 - -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%c:%p] %m%n - -log4j.appender.DEBUG=org.apache.log4j.RollingFileAppender -log4j.appender.DEBUG.File=${catalina.home}/logs/connsec-saml2sp-debug.log -log4j.appender.DEBUG.maxFileSize=2048KB -log4j.appender.DEBUG.MaxBackupIndex = 5 -log4j.appender.DEBUG.DatePattern=.yyyy-MM-dd -log4j.appender.DEBUG.layout=org.apache.log4j.PatternLayout -log4j.appender.DEBUG.layout.ConversionPattern=[%c:%p %X %L] %m%n - -#log4j.appender.ERROR=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.ERROR.DatePattern=.yyyy-MM-dd -log4j.appender.ERROR=org.apache.log4j.RollingFileAppender -log4j.appender.ERROR.File=${catalina.home}/logs/connsec-saml2sp-error.log - -log4j.appender.ERROR.maxFileSize=2048KB -log4j.appender.ERROR.MaxBackupIndex = 5 - -log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR.layout.ConversionPattern=[%c:%p %X %L] %m%n - -# spring -log4j.logger.org.springframework=INFO -log4j.logger.org.springframework.aop.framework=INFO -log4j.logger.org.springframework.transaction=INFO -log4j.logger.org.springframework.transaction.support=INFO -log4j.logger.com.connsec=DEBUG - diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp - 副本.jks b/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp - 副本.jks deleted file mode 100644 index d77d6a64..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp - 副本.jks and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer b/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer deleted file mode 100644 index 35e99671..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer.bak b/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer.bak deleted file mode 100644 index 9dae18f0..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.cer.bak and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.jks b/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.jks deleted file mode 100644 index 9c84830b..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/bin/main/saml2sp.jks and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/build.gradle b/maxkey-demos/maxkey-demo-saml/build.gradle deleted file mode 100644 index 47775c5b..00000000 --- a/maxkey-demos/maxkey-demo-saml/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -description = "maxkey-demo-saml" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-saml' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/lib/aopalliance-1.0.jar b/maxkey-demos/maxkey-demo-saml/lib/aopalliance-1.0.jar deleted file mode 100644 index 578b1a0c..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/aopalliance-1.0.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/aspectjrt-1.6.8.jar b/maxkey-demos/maxkey-demo-saml/lib/aspectjrt-1.6.8.jar deleted file mode 100644 index 2bdab5ac..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/aspectjrt-1.6.8.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/aspectjweaver-1.6.8.jar b/maxkey-demos/maxkey-demo-saml/lib/aspectjweaver-1.6.8.jar deleted file mode 100644 index 8e0dbcca..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/aspectjweaver-1.6.8.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/bcprov-jdk15-1.45.jar b/maxkey-demos/maxkey-demo-saml/lib/bcprov-jdk15-1.45.jar deleted file mode 100644 index 409070b0..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/bcprov-jdk15-1.45.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/commons-codec-1.4.jar b/maxkey-demos/maxkey-demo-saml/lib/commons-codec-1.4.jar deleted file mode 100644 index 458d432d..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/commons-codec-1.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/commons-collections-3.1.jar b/maxkey-demos/maxkey-demo-saml/lib/commons-collections-3.1.jar deleted file mode 100644 index 41e230fe..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/commons-collections-3.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/commons-httpclient-3.1.jar b/maxkey-demos/maxkey-demo-saml/lib/commons-httpclient-3.1.jar deleted file mode 100644 index 7c59774a..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/commons-httpclient-3.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/commons-lang-2.5.jar b/maxkey-demos/maxkey-demo-saml/lib/commons-lang-2.5.jar deleted file mode 100644 index ae491da8..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/commons-lang-2.5.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/jcip-annotations-1.0.jar b/maxkey-demos/maxkey-demo-saml/lib/jcip-annotations-1.0.jar deleted file mode 100644 index 06e9066b..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/jcip-annotations-1.0.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/jcl-over-slf4j-1.6.1.jar b/maxkey-demos/maxkey-demo-saml/lib/jcl-over-slf4j-1.6.1.jar deleted file mode 100644 index c44d8deb..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/jcl-over-slf4j-1.6.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/joda-time-1.6.jar b/maxkey-demos/maxkey-demo-saml/lib/joda-time-1.6.jar deleted file mode 100644 index 68068a4b..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/joda-time-1.6.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/jstl-1.2.jar b/maxkey-demos/maxkey-demo-saml/lib/jstl-1.2.jar deleted file mode 100644 index 0fd275e9..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/jstl-1.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/jul-to-slf4j-1.5.10.jar b/maxkey-demos/maxkey-demo-saml/lib/jul-to-slf4j-1.5.10.jar deleted file mode 100644 index 84b7846a..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/jul-to-slf4j-1.5.10.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/log4j-1.2.16.jar b/maxkey-demos/maxkey-demo-saml/lib/log4j-1.2.16.jar deleted file mode 100644 index 5429a903..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/log4j-1.2.16.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/mockito-all-1.9.0.jar b/maxkey-demos/maxkey-demo-saml/lib/mockito-all-1.9.0.jar deleted file mode 100644 index 273fd50f..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/mockito-all-1.9.0.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/not-yet-commons-ssl-0.3.9.jar b/maxkey-demos/maxkey-demo-saml/lib/not-yet-commons-ssl-0.3.9.jar deleted file mode 100644 index cb1bee3a..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/not-yet-commons-ssl-0.3.9.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/opensaml-2.3.2.jar b/maxkey-demos/maxkey-demo-saml/lib/opensaml-2.3.2.jar deleted file mode 100644 index 21582c78..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/opensaml-2.3.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/openws-1.3.1.jar b/maxkey-demos/maxkey-demo-saml/lib/openws-1.3.1.jar deleted file mode 100644 index 6449b847..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/openws-1.3.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aop-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aop-3.1.0.RELEASE.jar deleted file mode 100644 index 89122c61..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aop-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.asm-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.asm-3.1.0.RELEASE.jar deleted file mode 100644 index 63780c76..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.asm-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aspects-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aspects-3.1.0.RELEASE.jar deleted file mode 100644 index 15429f36..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.aspects-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.beans-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.beans-3.1.0.RELEASE.jar deleted file mode 100644 index 70843919..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.beans-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context-3.1.0.RELEASE.jar deleted file mode 100644 index e84b39e3..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context.support-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context.support-3.1.0.RELEASE.jar deleted file mode 100644 index b332c85f..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.context.support-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.core-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.core-3.1.0.RELEASE.jar deleted file mode 100644 index 7c2bced1..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.core-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.expression-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.expression-3.1.0.RELEASE.jar deleted file mode 100644 index 64388b36..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.expression-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument-3.1.0.RELEASE.jar deleted file mode 100644 index 6cb91ca3..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument.tomcat-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument.tomcat-3.1.0.RELEASE.jar deleted file mode 100644 index 9a5a14e4..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.instrument.tomcat-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jdbc-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jdbc-3.1.0.RELEASE.jar deleted file mode 100644 index 0bf5fc58..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jdbc-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jms-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jms-3.1.0.RELEASE.jar deleted file mode 100644 index b00e3f08..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.jms-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.orm-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.orm-3.1.0.RELEASE.jar deleted file mode 100644 index 82ef63e7..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.orm-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.oxm-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.oxm-3.1.0.RELEASE.jar deleted file mode 100644 index c4ebbb2e..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.oxm-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.test-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.test-3.1.0.RELEASE.jar deleted file mode 100644 index ce596414..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.test-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.transaction-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.transaction-3.1.0.RELEASE.jar deleted file mode 100644 index d26ceeb1..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.transaction-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web-3.1.0.RELEASE.jar deleted file mode 100644 index bb6c8ab5..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.portlet-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.portlet-3.1.0.RELEASE.jar deleted file mode 100644 index c2f8fc34..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.portlet-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.servlet-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.servlet-3.1.0.RELEASE.jar deleted file mode 100644 index 7f6f153b..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.servlet-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.struts-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.struts-3.1.0.RELEASE.jar deleted file mode 100644 index 1bfdf96f..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/org.springframework.web.struts-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/oro-2.0.8.jar b/maxkey-demos/maxkey-demo-saml/lib/oro-2.0.8.jar deleted file mode 100644 index 23488d26..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/oro-2.0.8.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/slf4j-api-1.6.1.jar b/maxkey-demos/maxkey-demo-saml/lib/slf4j-api-1.6.1.jar deleted file mode 100644 index f1f4fdd2..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/slf4j-api-1.6.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/slf4j-log4j12-1.6.1.jar b/maxkey-demos/maxkey-demo-saml/lib/slf4j-log4j12-1.6.1.jar deleted file mode 100644 index 64115995..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/slf4j-log4j12-1.6.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/spring-security-acl-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/spring-security-acl-3.1.0.RELEASE.jar deleted file mode 100644 index e5f0f36f..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/spring-security-acl-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/spring-security-config-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/spring-security-config-3.1.0.RELEASE.jar deleted file mode 100644 index d405e589..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/spring-security-config-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/spring-security-core-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/spring-security-core-3.1.0.RELEASE.jar deleted file mode 100644 index 8f63bcd9..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/spring-security-core-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/spring-security-taglibs-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/spring-security-taglibs-3.1.0.RELEASE.jar deleted file mode 100644 index 537bc110..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/spring-security-taglibs-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/spring-security-web-3.1.0.RELEASE.jar b/maxkey-demos/maxkey-demo-saml/lib/spring-security-web-3.1.0.RELEASE.jar deleted file mode 100644 index fd5f4b26..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/spring-security-web-3.1.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/velocity-1.5.jar b/maxkey-demos/maxkey-demo-saml/lib/velocity-1.5.jar deleted file mode 100644 index 7c7f2c43..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/velocity-1.5.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xalan-2.7.1.jar b/maxkey-demos/maxkey-demo-saml/lib/xalan-2.7.1.jar deleted file mode 100644 index 458fa73d..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xalan-2.7.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xercesImpl-2.10.0.jar b/maxkey-demos/maxkey-demo-saml/lib/xercesImpl-2.10.0.jar deleted file mode 100644 index 9dcd8c38..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xercesImpl-2.10.0.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xml-apis-2.10.0.jar b/maxkey-demos/maxkey-demo-saml/lib/xml-apis-2.10.0.jar deleted file mode 100644 index 46733464..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xml-apis-2.10.0.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xml-resolver-1.2.jar b/maxkey-demos/maxkey-demo-saml/lib/xml-resolver-1.2.jar deleted file mode 100644 index e535bdc0..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xml-resolver-1.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xmlsec-1.4.3.jar b/maxkey-demos/maxkey-demo-saml/lib/xmlsec-1.4.3.jar deleted file mode 100644 index f4ae4033..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xmlsec-1.4.3.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xmltooling-1.2.2.jar b/maxkey-demos/maxkey-demo-saml/lib/xmltooling-1.2.2.jar deleted file mode 100644 index bc97ec60..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xmltooling-1.2.2.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/lib/xmlunit-1.3.jar b/maxkey-demos/maxkey-demo-saml/lib/xmlunit-1.3.jar deleted file mode 100644 index b5965f78..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/lib/xmlunit-1.3.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/readme.txt b/maxkey-demos/maxkey-demo-saml/readme.txt deleted file mode 100644 index 06db30cf..00000000 --- a/maxkey-demos/maxkey-demo-saml/readme.txt +++ /dev/null @@ -1 +0,0 @@ -run on jdk 1.6 and tomcat 6 , 7 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AbstractRequestIntTest.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AbstractRequestIntTest.java deleted file mode 100644 index b0de10d0..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AbstractRequestIntTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import java.net.MalformedURLException; -import java.net.URL; - -import javax.servlet.http.HttpServletRequest; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.when; - - - -public abstract class AbstractRequestIntTest { - - // adapted from org.opensaml.saml2.binding.decoding.HTTPPostDecoderTest - protected void populateRequestURL(HttpServletRequest request, String requestURL) { - URL url = null; - try { - url = new URL(requestURL); - } catch (MalformedURLException e) { - fail("Malformed URL: " + e.getMessage()); - } - - when(request.getRequestURL()).thenReturn(new StringBuffer(requestURL)); - when(request.getScheme()).thenReturn(url.getProtocol()); - when(request.getServerName()).thenReturn(url.getHost()); - - if (url.getPort() != -1) { - when(request.getServerPort()).thenReturn(url.getPort()); - - } else { - if ("https".equalsIgnoreCase(url.getProtocol())) { - when(request.getServerPort()).thenReturn(url.getPort()); - } else if ("http".equalsIgnoreCase(url.getProtocol())) { - when(request.getServerPort()).thenReturn(80); - } - } - - when(request.getRequestURI()).thenReturn(url.getPath()); - when(request.getQueryString()).thenReturn(url.getQuery()); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AssertionConsumer.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AssertionConsumer.java deleted file mode 100644 index f85380e7..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AssertionConsumer.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.connsec.saml; - -import org.opensaml.saml2.core.Response; -import org.springframework.security.core.AuthenticationException; - -import com.connsec.spring.User; - -public interface AssertionConsumer { - - User consume(Response samlResponse) throws AuthenticationException; - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AuthnRequestGenerator.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AuthnRequestGenerator.java deleted file mode 100644 index 21623e25..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/AuthnRequestGenerator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import org.opensaml.Configuration; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.impl.AuthnRequestBuilder; -import org.opensaml.xml.XMLObjectBuilderFactory; - -import com.connsec.saml.util.IDService; -import com.connsec.saml.util.TimeService; -import com.connsec.saml.xml.IssuerGenerator; - - -public class AuthnRequestGenerator { - - private XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory(); - - private final String issuingEntityName; - private final TimeService timeService; - private final IDService idService; - private IssuerGenerator issuerGenerator; - - public AuthnRequestGenerator(String issuingEntityName, TimeService timeService, IDService idService) { - super(); - this.issuingEntityName = issuingEntityName; - this.timeService = timeService; - this.idService = idService; - - issuerGenerator = new IssuerGenerator(issuingEntityName); - } - - public AuthnRequest generateAuthnRequest(String destination, String responseLocation) { - - AuthnRequestBuilder authnRequestBuilder = (AuthnRequestBuilder) builderFactory.getBuilder(AuthnRequest.DEFAULT_ELEMENT_NAME); - - AuthnRequest authnRequest = authnRequestBuilder.buildObject(); - - authnRequest.setAssertionConsumerServiceURL(responseLocation); - authnRequest.setID(idService.generateID()); - authnRequest.setIssueInstant(timeService.getCurrentDateTime()); - authnRequest.setDestination(destination); - - authnRequest.setIssuer(issuerGenerator.generateIssuer()); - - return authnRequest; - } - - - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/RealAssertionConsumer.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/RealAssertionConsumer.java deleted file mode 100644 index e0935de3..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/RealAssertionConsumer.java +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.apache.commons.lang.StringUtils; -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeStatement; -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.validation.ValidationException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.GrantedAuthorityImpl; - -import com.connsec.saml.xml.SAML2ValidatorSuite; -import com.connsec.spring.IdentityProviderAuthenticationException; -import com.connsec.spring.ServiceProviderAuthenticationException; -import com.connsec.spring.User; - -public class RealAssertionConsumer implements AssertionConsumer { - - private final static Logger logger = LoggerFactory - .getLogger(RealAssertionConsumer.class); - - - SAML2ValidatorSuite validatorSuite = new SAML2ValidatorSuite(); - - @Override - public User consume(Response samlResponse) throws AuthenticationException { - - - try { - validatorSuite.validate(samlResponse); - } catch (ValidationException ve) { - logger.warn("Response Message failed Validation", ve); - throw new ServiceProviderAuthenticationException("Invalid SAML REsponse Message", ve); - } - - - checkResponseStatus(samlResponse); - - Assertion assertion = samlResponse.getAssertions().get(0); - - logger.debug("authenticationResponseIssuingEntityName {}" ,samlResponse.getIssuer().getValue()); - - logger.debug("assertion.getID() {}" ,assertion.getID()); - logger.debug("assertion.getSubject().getNameID().getValue() {}", assertion.getSubject().getNameID().getValue()); - - AuthnStatement authnStatement = assertion.getAuthnStatements().get(0); - - logger.debug("authnStatement.getAuthnInstant() {}",authnStatement.getAuthnInstant()); - - Set authorities = extractAuthorities(assertion.getAttributeStatements()); - logger.debug("Granted Authorities will be {}" , authorities); - - - logger.debug("assertion.getID() {}", assertion.getAuthnStatements()); - - return new User(assertion.getSubject().getNameID().getValue(), - samlResponse.getIssuer().getValue(), - assertion.getIssuer().getValue(), - samlResponse.getID(), - assertion.getID(), - samlResponse.getIssueInstant(), - assertion.getIssueInstant(), - authnStatement.getAuthnInstant(), - authorities); - - } - - private Set extractAuthorities( - List attributeStatements) { - - - for (AttributeStatement attributeStatement : attributeStatements) { - for (Attribute attribute : attributeStatement.getAttributes()) { - if( GrantedAuthority.class.getName().equalsIgnoreCase(attribute.getName())) { - logger.debug("found Granted Authorities."); - Set authorities = new HashSet(); - for (XMLObject xmlObj : attribute.getAttributeValues()) { - if(xmlObj instanceof XSString) - authorities.add(new GrantedAuthorityImpl(((XSString)xmlObj).getValue())); - } - return authorities; - } - } - } - throw new ServiceProviderAuthenticationException("There were no GrantedAuthority.class.getName() AttributeStatements"); - - } - - private void checkResponseStatus(Response samlResponse) { - - - if(StatusCode.SUCCESS_URI.equals( StringUtils.trim(samlResponse.getStatus().getStatusCode().getValue()))) { - - additionalValidationChecksOnSuccessfulResponse(samlResponse); - - } - - - else { - - StringBuilder extraInformation = extractExtraInformation(samlResponse); - - if(extraInformation.length() > 0) { - logger.warn("Extra information extracted from authentication failure was {}", extraInformation.toString()); - - throw new IdentityProviderAuthenticationException("Identity Provider has failed the authentication.", extraInformation.toString()); - } - - else { - throw new IdentityProviderAuthenticationException("Identity Provider has failed the authentication."); - } - - } - } - - private void additionalValidationChecksOnSuccessfulResponse( - Response samlResponse) { - //saml validator suite does not check for assertions on successful auths - if(samlResponse.getAssertions().isEmpty()){ - throw new ServiceProviderAuthenticationException("Successful Response did not contain any assertions"); - } - - //nor authnStatements - else if(samlResponse.getAssertions().get(0).getAuthnStatements().isEmpty()){ - throw new ServiceProviderAuthenticationException("Successful Response did not contain an assertions with an AuthnStatement"); - } - - //we require at attribute statements - else if(samlResponse.getAssertions().get(0).getAttributeStatements().isEmpty()){ - throw new ServiceProviderAuthenticationException("Successful Response did not contain an assertions with an AttributeStatements"); - - } - //we will require an issuer - else if(samlResponse.getIssuer() == null) { - throw new ServiceProviderAuthenticationException("Successful Response did not contain any Issuer"); - - } - } - - private StringBuilder extractExtraInformation(Response samlResponse) { - StringBuilder extraInformation = new StringBuilder(); - - if( samlResponse.getStatus().getStatusCode().getStatusCode() !=null ) { - - extraInformation.append(samlResponse.getStatus().getStatusCode().getStatusCode().getValue()); - } - - if(samlResponse.getStatus().getStatusMessage() != null) { - if(extraInformation.length() > 0) { - extraInformation.append(" - "); - } - extraInformation.append(samlResponse.getStatus().getStatusMessage()); - } - return extraInformation; - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/BindingAdapter.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/BindingAdapter.java deleted file mode 100644 index a0b292d1..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/BindingAdapter.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.binding; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.common.binding.SAMLMessageContext; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.ws.message.decoder.MessageDecodingException; -import org.opensaml.ws.message.encoder.MessageEncodingException; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; - -/** - * - * Abstracts the SAML Binding used to send/receive messages. - * - * @author jcox - * - */ -public interface BindingAdapter { - - public void sendSAMLMessage(SignableSAMLObject samlMessage, Endpoint endpoint, Credential signingCredential, HttpServletResponse response) throws MessageEncodingException; - - public SAMLMessageContext extractSAMLMessageContext(HttpServletRequest request) throws MessageDecodingException, SecurityException; - - public String extractSAMLMessage(HttpServletRequest request); - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/KeyStoreCredentialResolverDelegate.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/KeyStoreCredentialResolverDelegate.java deleted file mode 100644 index 4ec6d8b5..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/KeyStoreCredentialResolverDelegate.java +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.binding; - -import java.io.File; -import java.io.FileInputStream; -import java.security.KeyStore; -import java.util.Map; - -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.credential.CredentialResolver; -import org.opensaml.xml.security.credential.KeyStoreCredentialResolver; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Required; -import org.springframework.util.ResourceUtils; - - -/** - * - * Trivial implementation of CredentialResolver. Not recommended for production use as - * it is not secure. - * - * This class loads a Java keystore from spring config and instantiates - * an Open SAML KeyStoreCredentialResolver. All calls are then delegated to the - * KeyStoreCredentialResolver. - * - * - * @author jcox - * - */ -public class KeyStoreCredentialResolverDelegate implements CredentialResolver, InitializingBean { - - - private KeyStoreCredentialResolver keyStoreCredentialResolver; - - private String b64EncodedKeystore; - private String keystorePassword; - private String keyStoreFile; - private Map privateKeyPasswordsByAlias; - - - @Required - public void setB64EncodedKeystore(String b64EncodedKeystore) { - this.b64EncodedKeystore = b64EncodedKeystore; - } - - @Required - public void setKeystorePassword(String keystorePassword) { - this.keystorePassword = keystorePassword; - } - - @Required - public void setPrivateKeyPasswordsByAlias( - Map privateKeyPasswordsByAlias) { - this.privateKeyPasswordsByAlias = privateKeyPasswordsByAlias; - } - - @Override - public Iterable resolve(CriteriaSet criteriaSet) - throws SecurityException { - return keyStoreCredentialResolver.resolve(criteriaSet); - } - - @Override - public Credential resolveSingle(CriteriaSet criteriaSet) throws SecurityException { - return keyStoreCredentialResolver.resolveSingle(criteriaSet); - } - - @Override - public void afterPropertiesSet() throws Exception { - - KeyStore ks = KeyStore.getInstance("JKS"); - File file = ResourceUtils.getFile(keyStoreFile); - ks.load(new FileInputStream(file), keystorePassword.toCharArray()); -// ks.load(new ByteArrayInputStream(Base64.decodeBase64(b64EncodedKeystore.getBytes())), keystorePassword.toCharArray()); - - keyStoreCredentialResolver = new KeyStoreCredentialResolver(ks, privateKeyPasswordsByAlias); - } - - /** - * @param keyStoreFile the keyStoreFile to set - */ - public void setKeyStoreFile(String keyStoreFile) { - this.keyStoreFile = keyStoreFile; - } - - /** - * @return the keyStoreFile - */ - public String getKeyStoreFile() { - return keyStoreFile; - } - - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/PostBindingAdapter.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/PostBindingAdapter.java deleted file mode 100644 index 2e9d8096..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/PostBindingAdapter.java +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.binding; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.lang.StringUtils; -import org.apache.velocity.app.VelocityEngine; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.common.binding.BasicSAMLMessageContext; -import org.opensaml.common.binding.SAMLMessageContext; -import org.opensaml.common.binding.decoding.SAMLMessageDecoder; -import org.opensaml.common.binding.encoding.SAMLMessageEncoder; -import org.opensaml.saml2.binding.encoding.HTTPPostSimpleSignEncoder; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.ws.message.decoder.MessageDecodingException; -import org.opensaml.ws.message.encoder.MessageEncodingException; -import org.opensaml.ws.security.SecurityPolicyResolver; -import org.opensaml.ws.transport.http.HttpServletRequestAdapter; -import org.opensaml.ws.transport.http.HttpServletResponseAdapter; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Required; - -public class PostBindingAdapter implements BindingAdapter, InitializingBean{ - - public static final String SAML_REQUEST_POST_PARAM_NAME = "SAMLRequest"; - public static final String SAML_RESPONSE_POST_PARAM_NAME = "SAMLResponse"; - - private VelocityEngine velocityEngine; - - private final SAMLMessageDecoder decoder; - public SAMLMessageEncoder encoder; - private final String issuingEntityName; - private final SecurityPolicyResolver resolver; - - - - public PostBindingAdapter(SAMLMessageDecoder decoder, - String issuingEntityName, SecurityPolicyResolver resolver) { - super(); - this.decoder = decoder; - this.issuingEntityName = issuingEntityName; - this.resolver = resolver; - } - - - @Required - public void setVelocityEngine( - VelocityEngine velocityEngine) { - this.velocityEngine = velocityEngine; - } - - - @Override - public SAMLMessageContext extractSAMLMessageContext(HttpServletRequest request) throws MessageDecodingException, SecurityException { - - BasicSAMLMessageContext messageContext = new BasicSAMLMessageContext(); - - messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(request)); - messageContext.setSecurityPolicyResolver(resolver); - - decoder.decode(messageContext); - - return messageContext; - - } - - @Override - public void sendSAMLMessage(SignableSAMLObject samlMessage, - Endpoint endpoint, - Credential signingCredential, - HttpServletResponse response) throws MessageEncodingException { - - HttpServletResponseAdapter outTransport = new HttpServletResponseAdapter(response, false); - - BasicSAMLMessageContext messageContext = new BasicSAMLMessageContext(); - - messageContext.setOutboundMessageTransport(outTransport); - messageContext.setPeerEntityEndpoint(endpoint); - messageContext.setOutboundSAMLMessage(samlMessage); - messageContext.setOutboundMessageIssuer(issuingEntityName); - messageContext.setOutboundSAMLMessageSigningCredential(signingCredential); - - encoder.encode(messageContext); - - } - - - @Override - public String extractSAMLMessage(HttpServletRequest request) { - - if(StringUtils.isNotBlank(request.getParameter(SAML_REQUEST_POST_PARAM_NAME))) - return request.getParameter(SAML_REQUEST_POST_PARAM_NAME); - else - return request.getParameter(SAML_RESPONSE_POST_PARAM_NAME); - - } - - @Override - public void afterPropertiesSet() throws Exception { - encoder = new HTTPPostSimpleSignEncoder(velocityEngine, - "/templates/saml2-post-simplesign-binding.vm", true); - } - - - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SecurityPolicyDelegate.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SecurityPolicyDelegate.java deleted file mode 100644 index fbc27890..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SecurityPolicyDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.binding; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.ws.message.MessageContext; -import org.opensaml.ws.security.SecurityPolicy; -import org.opensaml.ws.security.SecurityPolicyException; -import org.opensaml.ws.security.SecurityPolicyRule; -import org.opensaml.ws.security.provider.BasicSecurityPolicy; - -public class SecurityPolicyDelegate implements SecurityPolicy { - - private final BasicSecurityPolicy basicSecurityPolicy; - - public SecurityPolicyDelegate(List securityPolicyRules) { - super(); - basicSecurityPolicy = new BasicSecurityPolicy(); - basicSecurityPolicy.getPolicyRules().addAll(securityPolicyRules); - } - - @Override - public void evaluate(MessageContext messageContext) throws SecurityPolicyException { - basicSecurityPolicy.evaluate(messageContext); - } - - @Override - public List getPolicyRules() { - return basicSecurityPolicy.getPolicyRules(); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SignatureSecurityPolicyRule.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SignatureSecurityPolicyRule.java deleted file mode 100644 index c96a4970..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/binding/SignatureSecurityPolicyRule.java +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.binding; - -import org.opensaml.Configuration; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.ws.message.MessageContext; -import org.opensaml.ws.security.SecurityPolicyException; -import org.opensaml.ws.security.SecurityPolicyRule; -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.CredentialResolver; -import org.opensaml.xml.security.credential.UsageType; -import org.opensaml.xml.security.criteria.EntityIDCriteria; -import org.opensaml.xml.security.criteria.UsageCriteria; -import org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver; -import org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine; -import org.opensaml.xml.validation.ValidationException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; - -/** -* Rule to check that the message has been signed by an issuer that has credentials -* in the keystore. -* -* We could use a SAMLProtocolMessageXMLSignatureSecurityPolicyRule, but, that -* relies on role info to be set (which we will not be using). Also, we will insist -* that the message be signed and not rely on an additional rule to check the isAuthenticated -* flag on the message context. -*/ -public class SignatureSecurityPolicyRule implements InitializingBean, SecurityPolicyRule { - - private final static Logger logger = LoggerFactory - .getLogger(SignatureSecurityPolicyRule.class); - - private final CredentialResolver credentialResolver; - private final SAMLSignatureProfileValidator samlSignatureProfileValidator; - private ExplicitKeySignatureTrustEngine trustEngine; - - public SignatureSecurityPolicyRule(CredentialResolver credentialResolver, SAMLSignatureProfileValidator samlSignatureProfileValidator) { - super(); - this.credentialResolver = credentialResolver; - this.samlSignatureProfileValidator = samlSignatureProfileValidator; - } - - @Override - public void afterPropertiesSet() throws Exception { - - KeyInfoCredentialResolver keyInfoCredResolver = - Configuration.getGlobalSecurityConfiguration().getDefaultKeyInfoCredentialResolver(); - - setTrustEngine(new ExplicitKeySignatureTrustEngine(credentialResolver,keyInfoCredResolver)); - } - - @Override - public void evaluate(MessageContext messageContext) throws SecurityPolicyException { - - logger.debug("evaluating signature of {}", messageContext); - - if(!( messageContext.getInboundMessage() instanceof SignableSAMLObject)) { - throw new SecurityPolicyException("Inbound Message is not a SignableSAMLObject"); - } - - SignableSAMLObject samlMessage = (SignableSAMLObject) messageContext.getInboundMessage(); - - if( !samlMessage.isSigned()) { - throw new SecurityPolicyException("InboundMessage was not signed."); - } - - checkSignatureProfile(samlMessage); - - checkMessageSignature(messageContext, samlMessage); - - } - - private void checkMessageSignature(MessageContext messageContext, - SignableSAMLObject samlMessage) throws SecurityPolicyException { - CriteriaSet criteriaSet = new CriteriaSet(); - logger.debug("Inbound issuer is {}", messageContext.getInboundMessageIssuer()); - criteriaSet.add( new EntityIDCriteria(messageContext.getInboundMessageIssuer())); - criteriaSet.add( new UsageCriteria(UsageType.SIGNING) ); - - try { - if (!getTrustEngine().validate( samlMessage.getSignature(), criteriaSet)) { - throw new SecurityPolicyException("Signature was either invalid or signing key could not be established as trusted"); - } - } catch (SecurityException se) { - throw new SecurityPolicyException("Error evaluating the signature",se); - } - } - - private void checkSignatureProfile(SignableSAMLObject samlMessage) - throws SecurityPolicyException { - try { - samlSignatureProfileValidator.validate(samlMessage.getSignature()); - } catch (ValidationException ve) { - - throw new SecurityPolicyException("Signature did not conform to SAML Signature profile",ve); - } - } - - public ExplicitKeySignatureTrustEngine getTrustEngine() { - return trustEngine; - } - - public void setTrustEngine(ExplicitKeySignatureTrustEngine trustEngine) { - this.trustEngine = trustEngine; - } -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/IDService.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/IDService.java deleted file mode 100644 index 7779a7d6..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/IDService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.util; - -import java.util.UUID; - -public class IDService { - - public String generateID() { - return UUID.randomUUID().toString(); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/TimeService.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/TimeService.java deleted file mode 100644 index 1b6cbd4c..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/util/TimeService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.util; - -import org.joda.time.DateTime; - -public class TimeService { - - public DateTime getCurrentDateTime() { - return new DateTime(); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/EndpointGenerator.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/EndpointGenerator.java deleted file mode 100644 index 7b2219ce..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/EndpointGenerator.java +++ /dev/null @@ -1,54 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.xml; - - -import javax.xml.namespace.QName; - -import org.apache.commons.lang.StringUtils; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLObjectBuilder; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.xml.XMLObjectBuilderFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class EndpointGenerator { - - private final static Logger logger = LoggerFactory.getLogger(EndpointGenerator.class); - - private XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory(); - - public Endpoint generateEndpoint(QName service, String location, String responseLocation) { - - logger.debug("end point service: {}", service); - logger.debug("end point location: {}", location); - logger.debug("end point responseLocation: {}", responseLocation); - - SAMLObjectBuilder endpointBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(service); - Endpoint samlEndpoint = endpointBuilder.buildObject(); - - samlEndpoint.setLocation(location); - - //this does not have to be set - if( StringUtils.isNotEmpty(responseLocation)) - samlEndpoint.setResponseLocation(responseLocation); - - return samlEndpoint; - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/IssuerGenerator.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/IssuerGenerator.java deleted file mode 100644 index f66812c5..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/IssuerGenerator.java +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.xml; - -import org.opensaml.Configuration; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.NameIDType; -import org.opensaml.saml2.core.impl.IssuerBuilder; -import org.opensaml.xml.XMLObjectBuilderFactory; - -public class IssuerGenerator { - - private final XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory(); - - private final String issuingEntityName; - - - public IssuerGenerator(String issuingEntityName) { - super(); - this.issuingEntityName = issuingEntityName; - } - - - public Issuer generateIssuer() { - - ///Issuer - IssuerBuilder issuerBuilder = (IssuerBuilder) builderFactory.getBuilder(Issuer.DEFAULT_ELEMENT_NAME); - Issuer issuer = issuerBuilder.buildObject(); - - - issuer.setValue(issuingEntityName); - issuer.setFormat(NameIDType.ENTITY); - - return issuer; - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/SAML2ValidatorSuite.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/SAML2ValidatorSuite.java deleted file mode 100644 index 4769b83a..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/saml/xml/SAML2ValidatorSuite.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.connsec.saml.xml; - -import org.opensaml.xml.Configuration; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.ValidatorSuite; -import org.springframework.beans.factory.InitializingBean; - -public class SAML2ValidatorSuite { - - public void validate(XMLObject xmlObject) throws ValidationException { - - ValidatorSuite schemaValidator = Configuration.getValidatorSuite("saml2-core-schema-validator"); - schemaValidator.validate(xmlObject); - ValidatorSuite specValidator = Configuration.getValidatorSuite("saml2-core-spec-validator"); - specValidator.validate(xmlObject); - - } - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/IdentityProviderAuthenticationException.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/IdentityProviderAuthenticationException.java deleted file mode 100644 index 9aca1203..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/IdentityProviderAuthenticationException.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.connsec.spring; - -import org.springframework.security.core.AuthenticationException; - -/** - * Indicates that the Identity Provider has failed the user's attempt to log in. - * This could be because the user has entered invalid credentials, the account is locked, etc... - * - * The user may be able to re-auththenticate given a second chance, or at the very least, - * be able to see in the IDP's ui as to why the authentication was not successful. - * - * - * - * @author jcox - * - */ -public class IdentityProviderAuthenticationException extends AuthenticationException { - - public IdentityProviderAuthenticationException(String msg, Object extraInformation) { - super(msg, extraInformation); - } - - - public IdentityProviderAuthenticationException(String msg) { - super(msg); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/RealAuthenticationFailureHandler.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/RealAuthenticationFailureHandler.java deleted file mode 100644 index e9809576..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/RealAuthenticationFailureHandler.java +++ /dev/null @@ -1,84 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.authentication.AuthenticationFailureHandler; -import org.springframework.security.web.savedrequest.RequestCache; -import org.springframework.security.web.savedrequest.SavedRequest; - -/** - * Handles authn failures of the SAMLResponseAuthenticationProcessingFilter. - * - * If the AuthenticationException is of type IdentityProviderAuthenticationException, - * retry the original request, which will cause a new authn attempt with the IDP. This - * is nearly identical to Spring's SavedRequestAwareAuthenticationSuccessHandler. - * - * Any other exceptions will result in responding with forbidden (403). - * - * A more sophisticated implementation might limit the number of attempts or - * allow the user to cancel the authn attempt. - * - * - * @author jcox - * - */ -public class RealAuthenticationFailureHandler implements - AuthenticationFailureHandler { - - private final static Logger logger = LoggerFactory - .getLogger(RealAuthenticationFailureHandler.class); - - private final RequestCache requestCache; - - - public RealAuthenticationFailureHandler(RequestCache requestCache) { - super(); - this.requestCache = requestCache; - } - - @Override - public void onAuthenticationFailure(HttpServletRequest request, - HttpServletResponse response, AuthenticationException authenticationException) - throws IOException, ServletException { - - SavedRequest savedRequest = requestCache.getRequest(request, response); - - logger.debug("saved Request: {}", savedRequest); - - if( authenticationException instanceof IdentityProviderAuthenticationException && savedRequest != null) { - - logger.warn("Authn Failure reported by the IDP.", authenticationException); - logger.debug("Retry original request of {}", savedRequest.getRedirectUrl()); - response.sendRedirect(savedRequest.getRedirectUrl()); - } - - else { - logger.warn("Unrecoverable authn failure. Sending to Forbidden", authenticationException); - response.sendError(HttpServletResponse.SC_FORBIDDEN); - } - } -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationEntryPoint.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationEntryPoint.java deleted file mode 100644 index d41088de..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationEntryPoint.java +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.lang.Validate; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.saml2.metadata.SingleSignOnService; -import org.opensaml.ws.message.encoder.MessageEncodingException; -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.credential.CredentialResolver; -import org.opensaml.xml.security.credential.UsageType; -import org.opensaml.xml.security.criteria.EntityIDCriteria; -import org.opensaml.xml.security.criteria.UsageCriteria; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Required; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; - -import com.connsec.saml.AuthnRequestGenerator; -import com.connsec.saml.binding.BindingAdapter; -import com.connsec.saml.util.IDService; -import com.connsec.saml.util.TimeService; -import com.connsec.saml.xml.EndpointGenerator; - -/** - * Sample AuthenticationEntryPoint that a service provider might use. - * - * A more sophisticated implementation might resolve the service end points using a SAML META service. - * - * - * - * @author jcox - * - */ -public class SAMLAuthenticationEntryPoint implements AuthenticationEntryPoint, InitializingBean { - - private final static Logger logger = LoggerFactory.getLogger(SAMLAuthenticationEntryPoint.class); - - private final TimeService timeService; - private final IDService idService; - private final String issuer; - - private String singleSignOnServiceURL; - private String assertionConsumerServiceURL; - private BindingAdapter bindingAdapter; - EndpointGenerator endpointGenerator; - AuthnRequestGenerator authnRequestGenerator; - CredentialResolver credentialResolver; - - Credential signingCredential; - - public SAMLAuthenticationEntryPoint(TimeService timeService, - IDService idService, String issuer) { - super(); - this.timeService = timeService; - this.idService = idService; - this.issuer = issuer; - } - - @Required - public void setSingleSignOnServiceURL(String singleSignOnServiceURL) { - this.singleSignOnServiceURL = singleSignOnServiceURL; - } - - @Required - public void setAssertionConsumerServiceURL(String assertionConsumerServiceURL) { - this.assertionConsumerServiceURL = assertionConsumerServiceURL; - } - - @Required - public void setBindingAdapter(BindingAdapter bindingAdapter) { - this.bindingAdapter = bindingAdapter; - } - - - @Required - public void setCredentialResolver(CredentialResolver credentialResolver) { - this.credentialResolver = credentialResolver; - } - - @Override - public void commence(HttpServletRequest request, - HttpServletResponse response, - AuthenticationException authException) throws IOException, ServletException { - - Endpoint endpoint = endpointGenerator.generateEndpoint(SingleSignOnService.DEFAULT_ELEMENT_NAME, singleSignOnServiceURL, assertionConsumerServiceURL); - - AuthnRequest authnReqeust = authnRequestGenerator.generateAuthnRequest(singleSignOnServiceURL,assertionConsumerServiceURL); - - logger.debug("Sending authnRequest to {}", singleSignOnServiceURL ); - - try { - bindingAdapter.sendSAMLMessage(authnReqeust, endpoint, signingCredential,response); - } catch (MessageEncodingException mee) { - logger.error("Could not send authnRequest to Identity Provider.", mee); - response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } - } - - @Override - public void afterPropertiesSet() throws Exception { - - authnRequestGenerator = new AuthnRequestGenerator(issuer,timeService,idService); - endpointGenerator = new EndpointGenerator(); - - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(new EntityIDCriteria(issuer)); - criteriaSet.add(new UsageCriteria(UsageType.SIGNING)); - - signingCredential = credentialResolver.resolveSingle(criteriaSet); - Validate.notNull(signingCredential); - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationToken.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationToken.java deleted file mode 100644 index 135d0273..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLAuthenticationToken.java +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import java.util.Collection; - -import org.opensaml.saml2.core.Response; -import org.springframework.security.authentication.AbstractAuthenticationToken; -import org.springframework.security.core.GrantedAuthority; - -/** - * @author jcox - * - */ -public class SAMLAuthenticationToken extends AbstractAuthenticationToken { - - private final Object principal; - private final Object credentials; - - /** - * This constructor can be safely used by any code that wishes to create a - * UsernamePasswordAuthenticationToken, as the {@link - * #isAuthenticated()} will return false. - * - * @param response - * @param credentials - */ - public SAMLAuthenticationToken(Response response, String credentials, Collection authorities) { - super(authorities); - this.principal = response; - this.credentials = credentials; - setAuthenticated(false); - - } - - /** - * This constructor should only be used by AuthenticationManager or AuthenticationProvider - * implementations that are satisfied with producing a trusted (i.e. {@link #isAuthenticated()} = true) - * authentication token. - - * @param user - * @param credentials - * @param authorities - */ - public SAMLAuthenticationToken(User user, String credentials, Collection authorities) { - super(authorities); - this.principal = user; - this.credentials = credentials; - super.setAuthenticated(true); // must use super, as we override - } - - @Override - public Object getCredentials() { - return credentials; - } - - @Override - public Object getPrincipal() { - return principal; - } - - /* taken from Spring Security's UsernamePasswordAuthenticationToken implementation - * @see org.springframework.security.authentication.AbstractAuthenticationToken#setAuthenticated(boolean) - */ - public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { - if (isAuthenticated) { - throw new IllegalArgumentException( - "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); - } - - super.setAuthenticated(false); - } - - @Override - public String toString() { - return "SAMLAuthenticationToken [principal=" + principal - + ", credentials=" + credentials + "]"; - } - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilter.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilter.java deleted file mode 100644 index 456aeb84..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilter.java +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.opensaml.common.binding.SAMLMessageContext; -import org.opensaml.saml2.core.Response; -import org.opensaml.ws.message.decoder.MessageDecodingException; -import org.opensaml.xml.security.SecurityException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Required; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; - -import com.connsec.saml.binding.BindingAdapter; - - -public class SAMLResponseAuthenticationProcessingFilter extends AbstractAuthenticationProcessingFilter { - - private final static Logger logger = LoggerFactory - .getLogger(SAMLResponseAuthenticationProcessingFilter.class); - - private BindingAdapter bindingAdapter; - - @Required - public void setBindingAdapter(BindingAdapter bindingAdapter) { - this.bindingAdapter = bindingAdapter; - } - - - public SAMLResponseAuthenticationProcessingFilter(String defaultFilterProcessesUrl) { - super(defaultFilterProcessesUrl); - } - - @Override - public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) - throws AuthenticationException, IOException, ServletException { - - logger.debug("Attempting authentication."); - //new a session - request.getSession(true).getAttribute("authentication"); - SAMLMessageContext messageContext = null; - - try { - messageContext = bindingAdapter.extractSAMLMessageContext(request); - } catch (MessageDecodingException me) { - throw new ServiceProviderAuthenticationException("Could not decode SAML Response", me); - } catch (SecurityException se) { - throw new ServiceProviderAuthenticationException("Could not decode SAML Response", se); - } - - logger.debug("Message received from issuer: "+ messageContext.getInboundMessageIssuer()); - - if(!(messageContext.getInboundSAMLMessage() instanceof Response)) { - throw new ServiceProviderAuthenticationException("SAML Message was not a Response."); - } - - String credentials = bindingAdapter.extractSAMLMessage(request); - - SAMLAuthenticationToken authRequest = new SAMLAuthenticationToken((Response)messageContext.getInboundSAMLMessage(),credentials, null); - - - authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); - logger.debug("authRequest.getDetails():" + authRequest.getDetails()); - - return this.getAuthenticationManager().authenticate(authRequest); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProvider.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProvider.java deleted file mode 100644 index 16f873c7..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/SAMLResponseAuthenticationProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import org.opensaml.saml2.core.Response; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.authentication.AuthenticationProvider; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import com.connsec.saml.AssertionConsumer; - -public class SAMLResponseAuthenticationProvider implements - AuthenticationProvider { - - private final static Logger logger = LoggerFactory - .getLogger(SAMLResponseAuthenticationProvider.class); - - private final AssertionConsumer assertionConsumer; - - public SAMLResponseAuthenticationProvider(AssertionConsumer assertionConsumer) { - super(); - this.assertionConsumer = assertionConsumer; - } - - @Override - public Authentication authenticate(Authentication submitted) - throws AuthenticationException { - - logger.debug("attempting to authenticate: {}", submitted); - - User user = assertionConsumer.consume((Response)submitted.getPrincipal()); - - logger.debug("getPrincipal: {}", submitted.getPrincipal()); - SAMLAuthenticationToken authenticated = new SAMLAuthenticationToken(user, (String)submitted.getCredentials(), user.getAuthorities()); - - authenticated.setDetails(submitted.getDetails()); - - logger.debug("Returning with authentication token of {}", authenticated); - - return authenticated; - - } - - @Override - public boolean supports(Class authentication) { - return (SAMLAuthenticationToken.class.isAssignableFrom(authentication)); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/ServiceProviderAuthenticationException.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/ServiceProviderAuthenticationException.java deleted file mode 100644 index 92a67c40..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/ServiceProviderAuthenticationException.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.connsec.spring; - -import org.springframework.security.core.AuthenticationException; - -/** - * Indicates that the Service Provider was the entity that failed the authentication. - * This could be because of an invalid Signature, invalid Message structure.... - * - * The user 'may' be authenticated with the Identity Provider. - * - * Further attempts to authenticate the user with the IDP would most probably - * be fruitless; - * - * - * @author jcox - * - */ -public class ServiceProviderAuthenticationException extends - AuthenticationException { - - public ServiceProviderAuthenticationException(String msg, Throwable t) { - super(msg, t); - } - - public ServiceProviderAuthenticationException(String msg) { - super(msg); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/User.java b/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/User.java deleted file mode 100644 index f3dad76d..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/java/com/connsec/spring/User.java +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import java.io.Serializable; -import java.security.Principal; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; -import org.joda.time.DateTime; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.GrantedAuthorityImpl; - -/** - * - * The principal that is attached the the SAMLAuthenticationToken. - * - * Note that there is no relation to Spring Security's User or UserDetails, except for the code - * that is used to sort the User's GrantedAuthorities - * - * @author jcox - * - */ -public class User implements Principal, Serializable { - - private final String name; - private final String authenticationResponseIssuingEntityName; - private final String authenticationAssertionIssuingEntityName; - private final String authenticationResponseID; - private final String authenticationAssertionID; - private final DateTime authenticationResponseIssueInstant; - private final DateTime authenticationAssertionIssueInstant; - private final DateTime authenticationIssueInstant; - - private final Set authorities; - - public User(String name, String authenticationResponseIssuingEntityName, - String authenticationAssertionIssuingEntityName, - String authenticationResponseID, - String authenticationAssertionID, - DateTime authenticationResponseIssueInstant, - DateTime authenticationAssertionIssueInstant, - DateTime authenticationIssueInstant, - Collection authorities) { - super(); - this.name = name; - this.authenticationResponseIssuingEntityName = authenticationResponseIssuingEntityName; - this.authenticationAssertionIssuingEntityName = authenticationAssertionIssuingEntityName; - this.authenticationResponseID = authenticationResponseID; - this.authenticationAssertionID = authenticationAssertionID; - this.authenticationResponseIssueInstant = authenticationResponseIssueInstant; - this.authenticationAssertionIssueInstant = authenticationAssertionIssueInstant; - this.authenticationIssueInstant = authenticationIssueInstant; - this.authorities = Collections.unmodifiableSet(sortAuthorities(authorities)); - } - - public String getAuthenticationResponseIssuingEntityName() { - return authenticationResponseIssuingEntityName; - } - - public String getAuthenticationAssertionIssuingEntityName() { - return authenticationAssertionIssuingEntityName; - } - - public DateTime getAuthenticationResponseIssueInstant() { - return authenticationResponseIssueInstant; - } - - public DateTime getAuthenticationAssertionIssueInstant() { - return authenticationAssertionIssueInstant; - } - - public DateTime getAuthenticationIssueInstant() { - return authenticationIssueInstant; - } - - public String getAuthenticationResponseID() { - return authenticationResponseID; - } - - public String getAuthenticationAssertionID() { - return authenticationAssertionID; - } - - public Collection getAuthorities() { - return authorities; - } - - @Override - public String getName() { - return name; - } - - /** - * Returns true if this object's name is equal to the name of the passed in arg. - * - * - */ - @Override - public boolean equals(Object obj) { - - if (obj == null) { return false; } - if (obj == this) { return true; } - - if (obj.getClass() != getClass()) { - return false; - } - User rhs = (User) obj; - return new EqualsBuilder() - .append(name, rhs.name) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(517, 43). - append(name).toHashCode(); - - } - - @Override - public String toString() { - return "User [name=" + name - + ", authenticationResponseIssuingEntityName=" - + authenticationResponseIssuingEntityName - + ", authenticationAssertionIssuingEntityName=" - + authenticationAssertionIssuingEntityName - + ", authenticationResponseID=" + authenticationResponseID - + ", authenticationAssertionID=" + authenticationAssertionID - + ", authenticationResponseIssueInstant=" - + authenticationResponseIssueInstant - + ", authenticationAssertionIssueInstant=" - + authenticationAssertionIssueInstant - + ", authenticationIssueInstant=" + authenticationIssueInstant - + ", authorities=" + authorities + "]"; - } - - //Taken From Spring Security's User impl - private static SortedSet sortAuthorities(Collection authorities) { - SortedSet sortedAuthorities = - new TreeSet(new AuthorityComparator()); - - for (GrantedAuthority grantedAuthority : authorities) { - sortedAuthorities.add(grantedAuthority); - } - - return sortedAuthorities; - } - - //Taken From Spring Security's User impl - private static class AuthorityComparator implements Comparator, Serializable { - public int compare(GrantedAuthority g1, GrantedAuthority g2) { - - if (g2.getAuthority() == null) { - return -1; - } - - if (g1.getAuthority() == null) { - return 1; - } - - return g1.getAuthority().compareTo(g2.getAuthority()); - } - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/application.properties b/maxkey-demos/maxkey-demo-saml/src/main/resources/application.properties deleted file mode 100644 index 681a73b8..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/resources/application.properties +++ /dev/null @@ -1,66 +0,0 @@ -ISSUING_ENTITY_ID=saml2sp - -WEB_APPLICATION_CHANNEL=http -WEB_APPLICATION_HOST_AND_PORT=saml.connsec.com -WEB_APPLICATION_CONTEXT_PATH=/saml2sp - - -ASSERTION_CONSUMER_URI=/index -ASSERTION_CONSUMER_URL=${WEB_APPLICATION_CHANNEL}://${WEB_APPLICATION_HOST_AND_PORT}${WEB_APPLICATION_CONTEXT_PATH}${ASSERTION_CONSUMER_URI} - -MAX_PARSER_POOL_SIZE=2 - -IDP_SSO_SERVICE_URL=http\://login.connsec.com/sec/authorize/saml20/ce8b08e9-b884-4d1f-a795-01ae25f63d48 - - -REPLAY_CACHE_LIFE_IN_MILLIS=14400000 -ISSUE_INSTANT_CHECK_CLOCK_SKEW_IN_SECONDS=600 -ISSUE_INSTANT_CHECK_VALIDITY_TIME_IN_SECONDS=600 - -KEYSTORE_PASSWORD=secret -KESTORE_PRIVATE_KEY_PASSWORD=secret -keyStoreFile=classpath:saml2sp.jks -#The b64 encoded keystore MUST have a private key with an alias of $ISSUING_ENTITY_ID -B64_ENCODED_KEYSTORE=/u3+7QAAAAIAAAACAAAAAQACc3AAAAErlmk7hAAAArowggK2MA4GCisGAQQBKgIRAQEFAASCAqIw4jynaKwOlOP74OM2+0lnYX8MOhvk0r71kvcbv9cusyIua3FJaIg1NBmgDrvF2JcUNcAhnyuBrafzW+3INGs8NNnmsPNgSPQ5cIMKRZ+44xxEmafy+FYPgw5RlmL+gXB/buiK1FzVuukjCR7/GCbQB2T0I1bZn5Ok/U0AlfGnAGBcXOR3efjdtKKImPBtMHQ9kBoCIlgROVKPEcSxPi7fm2SlN+tVjv1y9toYw2wRP+zsW5CAfY2mnRkQg58BtE2LhYhedSUUuaJAWTlWaWqA9rbTZmXlYqqOB/t86aYNuadT8nAu468MIucL3F2RQdMt9xDD3qRidT+h1I7ShnaF7pkUvynE5QKW3EIPhTaiRvMSUf6a984G4WerpdgmbzYEHUC9Kfw6WHcgKcGB5oAg4R2nlyEGLd2SBFv2vMRnXucwuofECK15YqCbu6wZGhQDKiGZo8MNcu8mPCq7vujOl4Azkjx1YyU1VHTQTyHP9BoOqS4lA8SjdEEGOm6p3R+CrwRratgET0UlopMInxuIvnuxXp5Vq4fHuY0GI65MRVQt9mSp5zeYvAYPYLSPmhcE2KchIR1Cb7NPbPID8D/EkNuCxG9FNPBhhtgMRdbOejJ3NPpt43DDt3nTpn/5pgBLsBxQ7hlPOb3Y4hsKCEI4UyVl+fTQieNIyEaAnt2Q/NNVGDJlc4aIAdDEfbOVbVdyYDViHskwTiKDdin4mAqTGj+qr0MVpoye6daZduftG85yx/1AnEjvPqUhKvi1kMKBi6q3z6XUMIq09RaQepx6xMboaiiqCU+Bi9kvdh3XNbnQ64DNPOhzytLAiBApb2IRaY1fkKSYOz+hFj0HbxF1cn5ITaQT1KeestiS+PuBO8JUR1yxTU0JQ4Tea0quTB+ragAAAAEABVguNTA5AAACSjCCAkYwggGvAgRMscTWMA0GCSqGSIb3DQEBBQUAMGoxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMxGTAXBgNVBAoMEFNlcnZpY2UgUHJvdmlkZXIxCzAJBgNVBAsMAnNwMQ0wCwYDVQQDDARqY294MB4XDTEwMTAxMDEzNTExOFoXDTIwMTAwNzEzNTExOFowajEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJVUzEZMBcGA1UECgwQU2VydmljZSBQcm92aWRlcjELMAkGA1UECwwCc3AxDTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIvtAFv5pWA6oRlLz/JhEG1Y7+6Wcvc2aU4rAH4PdWlmr5YkpA/gEd/J25AilVIE+c8nQwIzn5rDgJFGoBfjN/jUkKWLcB5jZC8SFzEx5zvGnR9wWgnbBL+jWQTal8M10ilhbRfklYLpkyTrwYWQdpDmMqVrN9wbNgU2imTihooNAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAdwn3tIk3612PRNtkxcuW/O5MKQyoy6KTS7V95KklJX452zebWDeM6/dR+XWVJLhRfN8+87cyos5HMYjIFVUJFNl9W5+UnRK75ku2hHBvPuU3ZTuW3/vGrNOLuaroPqELp+bNbfZkr2hezpeQl/4JKRFE418dvJJXW2OxE4A1K0sAAAACAANpZHAAAAErlm6iEQAFWC41MDkAAAJOMIICSjCCAbMCBEyxxXgwDQYJKoZIhvcNAQEFBQAwbDEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJVUzEaMBgGA1UECgwRSWRlbnRpdHkgUHJvdmlkZXIxDDAKBgNVBAsMA2lkcDENMAsGA1UEAwwEamNveDAeFw0xMDEwMTAxMzU0MDBaFw0yMDEwMDcxMzU0MDBaMGwxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMxGjAYBgNVBAoMEUlkZW50aXR5IFByb3ZpZGVyMQwwCgYDVQQLDANpZHAxDTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIt33orAL6MajhA8jeXaf8aPbIX24dlv0HwBBmdLBzkrO0I3bELtKSzbKFBkIwQZKaFHYdT7cxmy1epwffYsX2Ipguz99wGgH92GiWCLuPr14HqMAz/wx/1pAFFERa5rxadq0Jxmk1SF8gdz7FtoQOT0WUnIcs20yXta0Abqd1AxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAOCsgCB7zc/OrY8u54nUb2apJEZ20sSO48ilzn5PoGBQxFZJIg0E0eBTfCTNGQuF5anI4NZ7Q0gTRT8IBxeiPhksz+5NG4eCb6+4VyKJszx6rY7S6uq/08N3EMru5jyNVEn/o3F1QpwtlMDipH8s+dpuR6sEAcpugQYBH6F1MfI1iptlkKubwxS31ebaol0N4M5BFyA\=\= -AQEFAASCAqIw4jynaKwOlOP74OM2+0lnYX8MOhvk0r71kvcbv9cusyIua3FJaIg1\ -NBmgDrvF2JcUNcAhnyuBrafzW+3INGs8NNnmsPNgSPQ5cIMKRZ+44xxEmafy+FYP\ -gw5RlmL+gXB/buiK1FzVuukjCR7/GCbQB2T0I1bZn5Ok/U0AlfGnAGBcXOR3efjd\ -tKKImPBtMHQ9kBoCIlgROVKPEcSxPi7fm2SlN+tVjv1y9toYw2wRP+zsW5CAfY2m\ -nRkQg58BtE2LhYhedSUUuaJAWTlWaWqA9rbTZmXlYqqOB/t86aYNuadT8nAu468M\ -IucL3F2RQdMt9xDD3qRidT+h1I7ShnaF7pkUvynE5QKW3EIPhTaiRvMSUf6a984G\ -4WerpdgmbzYEHUC9Kfw6WHcgKcGB5oAg4R2nlyEGLd2SBFv2vMRnXucwuofECK15\ -YqCbu6wZGhQDKiGZo8MNcu8mPCq7vujOl4Azkjx1YyU1VHTQTyHP9BoOqS4lA8Sj\ -dEEGOm6p3R+CrwRratgET0UlopMInxuIvnuxXp5Vq4fHuY0GI65MRVQt9mSp5zeY\ -vAYPYLSPmhcE2KchIR1Cb7NPbPID8D/EkNuCxG9FNPBhhtgMRdbOejJ3NPpt43DD\ -t3nTpn/5pgBLsBxQ7hlPOb3Y4hsKCEI4UyVl+fTQieNIyEaAnt2Q/NNVGDJlc4aI\ -AdDEfbOVbVdyYDViHskwTiKDdin4mAqTGj+qr0MVpoye6daZduftG85yx/1AnEjv\ -PqUhKvi1kMKBi6q3z6XUMIq09RaQepx6xMboaiiqCU+Bi9kvdh3XNbnQ64DNPOhz\ -ytLAiBApb2IRaY1fkKSYOz+hFj0HbxF1cn5ITaQT1KeestiS+PuBO8JUR1yxTU0J\ -Q4Tea0quTB+ragAAAAEABVguNTA5AAACSjCCAkYwggGvAgRMscTWMA0GCSqGSIb3\ -DQEBBQUAMGoxJDAiBgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTEL\ -MAkGA1UEBhMCVVMxGTAXBgNVBAoMEFNlcnZpY2UgUHJvdmlkZXIxCzAJBgNVBAsM\ -AnNwMQ0wCwYDVQQDDARqY294MB4XDTEwMTAxMDEzNTExOFoXDTIwMTAwNzEzNTEx\ -OFowajEkMCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYD\ -VQQGEwJVUzEZMBcGA1UECgwQU2VydmljZSBQcm92aWRlcjELMAkGA1UECwwCc3Ax\ -DTALBgNVBAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIvtAFv5\ -pWA6oRlLz/JhEG1Y7+6Wcvc2aU4rAH4PdWlmr5YkpA/gEd/J25AilVIE+c8nQwIz\ -n5rDgJFGoBfjN/jUkKWLcB5jZC8SFzEx5zvGnR9wWgnbBL+jWQTal8M10ilhbRfk\ -lYLpkyTrwYWQdpDmMqVrN9wbNgU2imTihooNAgMBAAEwDQYJKoZIhvcNAQEFBQAD\ -gYEAdwn3tIk3612PRNtkxcuW/O5MKQyoy6KTS7V95KklJX452zebWDeM6/dR+XWV\ -JLhRfN8+87cyos5HMYjIFVUJFNl9W5+UnRK75ku2hHBvPuU3ZTuW3/vGrNOLuaro\ -PqELp+bNbfZkr2hezpeQl/4JKRFE418dvJJXW2OxE4A1K0sAAAACAANpZHAAAAEr\ -lm6iEQAFWC41MDkAAAJOMIICSjCCAbMCBEyxxXgwDQYJKoZIhvcNAQEFBQAwbDEk\ -MCIGCSqGSIb3DQEJARYVamFtZXMucy5jb3hAZ21haWwuY29tMQswCQYDVQQGEwJV\ -UzEaMBgGA1UECgwRSWRlbnRpdHkgUHJvdmlkZXIxDDAKBgNVBAsMA2lkcDENMAsG\ -A1UEAwwEamNveDAeFw0xMDEwMTAxMzU0MDBaFw0yMDEwMDcxMzU0MDBaMGwxJDAi\ -BgkqhkiG9w0BCQEWFWphbWVzLnMuY294QGdtYWlsLmNvbTELMAkGA1UEBhMCVVMx\ -GjAYBgNVBAoMEUlkZW50aXR5IFByb3ZpZGVyMQwwCgYDVQQLDANpZHAxDTALBgNV\ -BAMMBGpjb3gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIt33orAL6MajhA8\ -jeXaf8aPbIX24dlv0HwBBmdLBzkrO0I3bELtKSzbKFBkIwQZKaFHYdT7cxmy1epw\ -ffYsX2Ipguz99wGgH92GiWCLuPr14HqMAz/wx/1pAFFERa5rxadq0Jxmk1SF8gdz\ -7FtoQOT0WUnIcs20yXta0Abqd1AxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAOCsg\ -CB7zc/OrY8u54nUb2apJEZ20sSO48ilzn5PoGBQxFZJIg0E0eBTfCTNGQuF5anI4\ -NZ7Q0gTRT8IBxeiPhksz+5NG4eCb6+4VyKJszx6rY7S6uq/08N3EMru5jyNVEn/o\ -3F1QpwtlMDipH8s+dpuR6sEAcpugQYBH6F1MfI1iptlkKubwxS31ebaol0N4M5BF\ -yA== - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/log4j.properties b/maxkey-demos/maxkey-demo-saml/src/main/resources/log4j.properties deleted file mode 100644 index e351e411..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/resources/log4j.properties +++ /dev/null @@ -1,48 +0,0 @@ -# General Log Settings -#log4j.rootLogger=INFO,LOGFILE,stdout -log4j.rootLogger=INFO,LOGFILE,stdout - -#appender config:stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%c:%p %X %L] %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-d{HH:mm:ss.SSS} [%c:%p %X{$UserName$} %L] %m%n - -#appender config:LOGFILE -# log file arrcoss file size -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.LOGFILE.DatePattern=.yyyy-MM-dd -log4j.appender.LOGFILE.File=${catalina.home}/logs/connsec-saml2sp-out.log -log4j.appender.LOGFILE.maxFileSize=2048KB -log4j.appender.LOGFILE.MaxBackupIndex = 5 - -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%c:%p] %m%n - -log4j.appender.DEBUG=org.apache.log4j.RollingFileAppender -log4j.appender.DEBUG.File=${catalina.home}/logs/connsec-saml2sp-debug.log -log4j.appender.DEBUG.maxFileSize=2048KB -log4j.appender.DEBUG.MaxBackupIndex = 5 -log4j.appender.DEBUG.DatePattern=.yyyy-MM-dd -log4j.appender.DEBUG.layout=org.apache.log4j.PatternLayout -log4j.appender.DEBUG.layout.ConversionPattern=[%c:%p %X %L] %m%n - -#log4j.appender.ERROR=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.ERROR.DatePattern=.yyyy-MM-dd -log4j.appender.ERROR=org.apache.log4j.RollingFileAppender -log4j.appender.ERROR.File=${catalina.home}/logs/connsec-saml2sp-error.log - -log4j.appender.ERROR.maxFileSize=2048KB -log4j.appender.ERROR.MaxBackupIndex = 5 - -log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR.layout.ConversionPattern=[%c:%p %X %L] %m%n - -# spring -log4j.logger.org.springframework=INFO -log4j.logger.org.springframework.aop.framework=INFO -log4j.logger.org.springframework.transaction=INFO -log4j.logger.org.springframework.transaction.support=INFO -log4j.logger.com.connsec=DEBUG - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp - 副本.jks b/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp - 副本.jks deleted file mode 100644 index d77d6a64..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp - 副本.jks and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer b/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer deleted file mode 100644 index 35e99671..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer.bak b/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer.bak deleted file mode 100644 index 9dae18f0..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.cer.bak and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.jks b/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.jks deleted file mode 100644 index 9c84830b..00000000 Binary files a/maxkey-demos/maxkey-demo-saml/src/main/resources/saml2sp.jks and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-saml/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-property-mappings.xml b/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-property-mappings.xml deleted file mode 100644 index d23b2401..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-property-mappings.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-sp-config.xml b/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-sp-config.xml deleted file mode 100644 index f6a0092e..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-sp-config.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - classpath - org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-spring-security.xml b/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-spring-security.xml deleted file mode 100644 index 7ba13023..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/spring/applicationContext-spring-security.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a6c9cfa4..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - saml2sp - - - - log4jConfigLocation - classpath:log4j.properties - - - log4jRefreshInterval - 60000 - - - - org.springframework.web.util.Log4jConfigListener - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - /* - - - org.springframework.web.context.ContextLoaderListener - - - - org.springframework.web.context.request.RequestContextListener - - - - org.springframework.security.web.session.HttpSessionEventPublisher - - - - - - contextConfigLocation - /WEB-INF/spring/applicationContext*.xml - - - - - index.jsp - - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/admin.jsp b/maxkey-demos/maxkey-demo-saml/src/main/webapp/admin.jsp deleted file mode 100644 index 5cdf2b70..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/admin.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> - - - - - -Service Provider Admin - - - -

Service Provider Admin Page

- -

This page is secured. You must have the ROLE_ADMIN authority to be here.

- - unprotected SP home page
- protected SP user page
- End your session with the Service Provider Does not end your session with the IDP
- -

Your current Spring Security Credentials are:

- -

Authentication Principal is:

-

Authentication Credentials are:

-

Authentication Details are:

- - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-saml/src/main/webapp/index.jsp deleted file mode 100644 index 8e68e8b4..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/index.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> - - - - -Service Provider Home(index) Page - - - -

Service Provider Home(index) Page

- -

This page is not secured.

- - protected user page
- protected admin page
- End your session with the Service Provider Does not end your session with the IDP
- -

Your current Spring Security Credentials are:

- -

Authentication Principal is:

-

Authentication Credentials are:

-

Authentication Details are:

- - - diff --git a/maxkey-demos/maxkey-demo-saml/src/main/webapp/user.jsp b/maxkey-demos/maxkey-demo-saml/src/main/webapp/user.jsp deleted file mode 100644 index 6d8ca93f..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/main/webapp/user.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> - - - - - -Service Provider User Page - - - -

Service Provider User Page

- -

This page is secured. You must have the ROLE_USER authority to be here.

- - unprotected home page
- protected admin page
- End your session with the Service Provider Does not end your session with the IDP
- -

Your current Spring Security Credentials are:

- -

Authentication Principal is:

-

Authentication Credentials are:

-

Authentication Details are:

- - - diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/AuthnRequestGeneratorXMLTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/AuthnRequestGeneratorXMLTest.java deleted file mode 100644 index af214d77..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/AuthnRequestGeneratorXMLTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import static org.mockito.Mockito.when; - -import org.joda.time.DateTime; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.saml2.core.AuthnRequest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.connsec.saml.AuthnRequestGenerator; -import com.connsec.saml.util.IDService; -import com.connsec.saml.util.TimeService; -import com.connsec.saml.xml.AbstractXMLTest; - -public class AuthnRequestGeneratorXMLTest extends AbstractXMLTest{ - - private final static Logger logger = LoggerFactory.getLogger(AuthnRequestGeneratorXMLTest.class); - - AuthnRequestGenerator authnRequestGenerator; - private final String singleSignonService = "https://idp.com/authresponsder"; - private final String assertionConsumerURL="https://sp.com/assertionConsumer"; - private final String issuerName = "the sp"; - private final String authnRequestID = "1234321"; - - @Mock TimeService timeService; - @Mock IDService idService; - - public AuthnRequestGeneratorXMLTest() { - super(); - } - - @Override - protected void setUp() throws Exception { - - super.setUp(); - - MockitoAnnotations.initMocks(this); - - authnRequestGenerator = new AuthnRequestGenerator(issuerName, timeService, idService); - } - - public void testGenerateAuthnRequest() throws Exception { - - when(timeService.getCurrentDateTime()).thenReturn(new DateTime("2010-10-26T09:30:00.000Z")); - when(idService.generateID()).thenReturn(authnRequestID); - - AuthnRequest authnRequest = authnRequestGenerator.generateAuthnRequest(singleSignonService,assertionConsumerURL); - - assertNotNull(authnRequest); - - String xml = getAsXMLString(authnRequest); - - logger.debug("AuthnRequest is: \n{}", xml); - - //saml-core-2.0-os section 3.2.1 Required attributes on RequestAbstract Type - assertXpathExists("/saml2p:AuthnRequest",xml); - assertXpathExists("/saml2p:AuthnRequest[@AssertionConsumerServiceURL='"+assertionConsumerURL+"']",xml); - assertXpathExists("/saml2p:AuthnRequest[@ID='"+authnRequestID+"']",xml); - //optional - assertXpathExists("/saml2p:AuthnRequest[@Destination='"+singleSignonService+"']",xml); - - assertXpathExists("/saml2p:AuthnRequest[@AssertionConsumerServiceURL='"+assertionConsumerURL+"']",xml); - - - //saml-profiles-2.0-os 4.1.4.2 - //lines 515-518 - assertXpathExists("/saml2p:AuthnRequest[saml2a:Issuer='"+issuerName+"']",xml); - assertXpathExists( "/saml2p:AuthnRequest/saml2a:Issuer[@Format='urn:oasis:names:tc:SAML:2.0:nameid-format:entity']", xml); - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/KeyStoreCredentialResolverDelegateIntTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/KeyStoreCredentialResolverDelegateIntTest.java deleted file mode 100644 index 47e4023b..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/KeyStoreCredentialResolverDelegateIntTest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. - - -package com.connsec.saml; - -import static org.junit.Assert.*; - -import java.util.Iterator; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.criteria.EntityIDCriteria; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import com.connsec.saml.binding.KeyStoreCredentialResolverDelegate; - - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations={"classpath:applicationContext-test-config.xml"}) -public class KeyStoreCredentialResolverDelegateIntTest { - - private final static Logger logger = LoggerFactory - .getLogger(KeyStoreCredentialResolverDelegateIntTest.class); - - private KeyStoreCredentialResolverDelegate keyStoreCredentialResolverDelegate; - - - - @Autowired - public void setKeyStoreCredentialResolverDelegate( - KeyStoreCredentialResolverDelegate keyStoreCredentialResolverDelegate) { - this.keyStoreCredentialResolverDelegate = keyStoreCredentialResolverDelegate; - } - - - - @Test - public void testResolvePrivateKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("sp"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Iterable iterable = keyStoreCredentialResolverDelegate.resolve(criteriaSet); - - assertNotNull(iterable); - - Iterator iterator = iterable.iterator(); - - if(iterator.hasNext()) { - Credential credential = iterator.next(); - logger.debug("private credential is {}", credential); - assertEquals("sp",credential.getEntityId()); - assertNotNull(credential.getPrivateKey()); - assertFalse(iterator.hasNext()); - } - - else { - fail("Iterable was empty"); - } - - - } - - @Test - public void testResolveSinglePrivateKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("sp"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Credential credential = keyStoreCredentialResolverDelegate.resolveSingle(criteriaSet); - - assertNotNull(credential); - - logger.debug("private credential is {}", credential); - assertEquals("sp",credential.getEntityId()); - assertNotNull(credential.getPrivateKey()); - - - logger.debug("entity id is: {} " + credential.getEntityId()); - } - - - - @Test - public void testResolvePublicKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("idp"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Iterable iterable = keyStoreCredentialResolverDelegate.resolve(criteriaSet); - - assertNotNull(iterable); - - Iterator iterator = iterable.iterator(); - - if(iterator.hasNext()) { - Credential credential = iterator.next(); - logger.debug("public credential is {}", credential); - assertEquals("idp",credential.getEntityId()); - assertNotNull(credential.getPublicKey()); - assertFalse(iterator.hasNext()); - } - - else { - fail("Iterable was empty"); - } - - - - } - - @Test - public void testResolveSinglePublicKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("idp"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Credential credential = keyStoreCredentialResolverDelegate.resolveSingle(criteriaSet); - - assertNotNull(credential); - - logger.debug("public credential is {}", credential); - assertEquals("idp",credential.getEntityId()); - assertNotNull(credential.getPublicKey()); - - logger.debug("entity id is: {} " + credential.getEntityId()); - } - - @Test - public void testResolveUnknownKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("foo"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Iterable iterable = keyStoreCredentialResolverDelegate.resolve(criteriaSet); - - assertNotNull(iterable); - - Iterator iterator = iterable.iterator(); - - assertFalse(iterator.hasNext()); - - } - - @Test - public void testResolveSingleUnknownKey() throws Exception { - - assertNotNull(keyStoreCredentialResolverDelegate); - - EntityIDCriteria criteria = new EntityIDCriteria("foo"); - - CriteriaSet criteriaSet = new CriteriaSet(); - criteriaSet.add(criteria); - - Credential credential = keyStoreCredentialResolverDelegate.resolveSingle(criteriaSet); - - assertNull(credential); - - } -} -*/ \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/PostBindingAdapterTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/PostBindingAdapterTest.java deleted file mode 100644 index f97cc72c..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/PostBindingAdapterTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.velocity.app.VelocityEngine; -import org.junit.Before; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.common.binding.BasicSAMLMessageContext; -import org.opensaml.common.binding.SAMLMessageContext; -import org.opensaml.common.binding.decoding.SAMLMessageDecoder; -import org.opensaml.common.binding.encoding.SAMLMessageEncoder; -import org.opensaml.saml2.binding.encoding.HTTPPostSimpleSignEncoder; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.ws.message.MessageContext; -import org.opensaml.ws.security.SecurityPolicyResolver; -import org.opensaml.ws.transport.http.HttpServletResponseAdapter; -import org.opensaml.xml.security.credential.Credential; -import org.springframework.ui.velocity.VelocityEngineFactoryBean; - -import com.connsec.saml.binding.PostBindingAdapter; - -public class PostBindingAdapterTest { - - //args to class under test - @Mock Endpoint endpoint; - @Mock HttpServletResponse response; - @Mock HttpServletRequest request; - @Mock SignableSAMLObject samlMessage; - private String b64EncodedMessage = "some b64EncodedMessage"; - - - //collaborators - @Mock SAMLMessageEncoder encoder; - @Mock VelocityEngineFactoryBean velocityEngineFactory; - @Mock SAMLMessageDecoder decoder; - @Mock Credential signingCredential; - private final String issuingEntityName = "https:/us.com"; - private final String inboundIssuingEntityName = "https://them.com"; - @Mock SecurityPolicyResolver securityPolicyResolver; - - - - @Mock VelocityEngine velocityEngine; - - //return values of collabs - - @Mock Response authnResponse; - @Mock Issuer issuer; - @Mock Credential cred; - @Mock Endpoint endPoint; - - //class under test - @InjectMocks PostBindingAdapter postBindingAdapter; - - - @Before - public void before() { - - postBindingAdapter = new PostBindingAdapter(decoder,issuingEntityName,securityPolicyResolver); - MockitoAnnotations.initMocks(this); - } - - //@Test - public void testExtractSAMLMessageContext() throws Exception { - - expectMessageIsDecoded(); - - SAMLMessageContext messageContext = postBindingAdapter.extractSAMLMessageContext(request); - - assertEquals (authnResponse, messageContext.getInboundSAMLMessage()); - - } - - private void expectMessageIsDecoded() throws Exception { - - doAnswer(new Answer() { - public Object answer(InvocationOnMock invocation) { - Object[] args = invocation.getArguments(); - SAMLMessageContext messageContext = (SAMLMessageContext) args[0]; - messageContext.setInboundMessage(authnResponse); - messageContext.setInboundSAMLMessage(authnResponse); - messageContext.setInboundMessageIssuer(inboundIssuingEntityName); - messageContext.setSecurityPolicyResolver(securityPolicyResolver); - return null; - }}) - .when(decoder).decode((MessageContext) any()); - } - - - @Test - public void testSendSAMLMessage() throws Exception { - - - postBindingAdapter.sendSAMLMessage(samlMessage, endpoint, signingCredential,response); - - ArgumentCaptor argument = ArgumentCaptor.forClass(BasicSAMLMessageContext.class); - - verify(encoder).encode(argument.capture()); - - BasicSAMLMessageContext actualMC = argument.getValue(); - assertEquals(samlMessage, actualMC.getOutboundSAMLMessage()); - assertEquals(issuingEntityName, actualMC.getOutboundMessageIssuer()); - assertEquals(endpoint, actualMC.getPeerEntityEndpoint()); - assertEquals(signingCredential,actualMC.getOuboundSAMLMessageSigningCredential()); - assertEquals(HttpServletResponseAdapter.class, actualMC.getOutboundMessageTransport().getClass()); - - } - - @Test - public void testExtractSAMLRequestMessage() throws Exception { - when(request.getParameter(PostBindingAdapter.SAML_REQUEST_POST_PARAM_NAME)).thenReturn(b64EncodedMessage); - assertEquals(b64EncodedMessage, postBindingAdapter.extractSAMLMessage(request)); - } - - @Test - public void testExtractSAMLResponseMessage() throws Exception { - when(request.getParameter(PostBindingAdapter.SAML_RESPONSE_POST_PARAM_NAME)).thenReturn(b64EncodedMessage); - assertEquals(b64EncodedMessage, postBindingAdapter.extractSAMLMessage(request)); - } - - @Test - public void testAfterPropertiesSet() throws Exception { - when(velocityEngineFactory.getObject()).thenReturn(velocityEngine); - - postBindingAdapter.afterPropertiesSet(); - - assertTrue (postBindingAdapter.encoder instanceof HTTPPostSimpleSignEncoder); - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/RealAssertionConsumerTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/RealAssertionConsumerTest.java deleted file mode 100644 index dd7c3f9f..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/RealAssertionConsumerTest.java +++ /dev/null @@ -1,538 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.DefaultBootstrap; -import org.opensaml.common.SAMLObjectBuilder; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeStatement; -import org.opensaml.saml2.core.AttributeValue; -import org.opensaml.saml2.core.AuthnContext; -import org.opensaml.saml2.core.AuthnContextClassRef; -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.NameID; -import org.opensaml.saml2.core.NameIDType; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.saml2.core.StatusDetail; -import org.opensaml.saml2.core.StatusMessage; -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.core.impl.AttributeBuilder; -import org.opensaml.saml2.core.impl.AttributeStatementBuilder; -import org.opensaml.saml2.core.impl.AuthnContextBuilder; -import org.opensaml.saml2.core.impl.AuthnContextClassRefBuilder; -import org.opensaml.saml2.core.impl.AuthnStatementBuilder; -import org.opensaml.saml2.core.impl.NameIDBuilder; -import org.opensaml.saml2.core.impl.ResponseImpl; -import org.opensaml.saml2.core.impl.SubjectBuilder; -import org.opensaml.saml2.core.impl.SubjectConfirmationBuilder; -import org.opensaml.saml2.core.impl.SubjectConfirmationDataBuilder; -import org.opensaml.xml.Configuration; -import org.opensaml.xml.XMLObjectBuilderFactory; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.schema.impl.XSStringBuilder; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.GrantedAuthorityImpl; - -import com.connsec.saml.RealAssertionConsumer; -import com.connsec.spring.IdentityProviderAuthenticationException; -import com.connsec.spring.ServiceProviderAuthenticationException; -import com.connsec.spring.User; - -/** - * More of an integration test than just a unit test. - * - * @author jcox - * - */ -public class RealAssertionConsumerTest { - - private String responseID= "1"; - private String inResponseTo= "XYZ"; - private String assertionID = "777"; - private String assertionIssuer = "assertion issuer"; - private String responseIssuer = "response issuer"; - private String subjectName = "some guy"; - - private DateTime assertionIssueInstant = new DateTime("2010-10-26T09:30:01.000Z"); - private DateTime responseIssueInstant = new DateTime("2010-10-26T09:30:00.000Z"); - private DateTime authnInstant = new DateTime("2010-10-26T09:15:00.000Z"); - private DateTime validUntil = new DateTime("2010-10-26T09:45:00.000Z"); - - - private String recepientAssertionConsumerURL; - private String clientAddress; - - List authorities; - final String role1 = "ROLE_1"; - final String role2 = "ROLE_2"; - - static XMLObjectBuilderFactory builderFactory; - - - //class under test - RealAssertionConsumer consumer; - - - @BeforeClass - public static void beforeClass() throws Exception{ - - //need to bootstrap SAML for the validators - DefaultBootstrap.bootstrap(); - - builderFactory = Configuration.getBuilderFactory(); - - } - - @Before - public void before() throws Exception { - - MockitoAnnotations.initMocks(this); - consumer = new RealAssertionConsumer(); - - //assertions = new ArrayList(); - authorities = new ArrayList(); - - authorities.add(role1); - authorities.add(role2); - - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumeAuthnRequestWithNoStatus() { - - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - - - consumer.consume(samlResponse); - - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumeAuthnRequestWithNoStatusCode() { - - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - - SAMLObjectBuilder statusBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME); - Status status = statusBuilder.buildObject(); - samlResponse.setStatus(status); - - - - consumer.consume(samlResponse); - - } - - - @Test(expected=IdentityProviderAuthenticationException.class) - public void testConsumeRejectedAuthnRequest() { - - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - - SAMLObjectBuilder statusBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME); - Status status = statusBuilder.buildObject(); - samlResponse.setStatus(status); - - SAMLObjectBuilder statusCodeBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME); - StatusCode statusCode = statusCodeBuilder.buildObject(); - statusCode.setValue(StatusCode.RESPONDER_URI); - status.setStatusCode(statusCode); - - consumer.consume(samlResponse); - } - - @Test(expected=IdentityProviderAuthenticationException.class) - public void testConsumeRejectedAuthnRequestWithSubStatusCode() { - - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - - SAMLObjectBuilder statusBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME); - Status status = statusBuilder.buildObject(); - samlResponse.setStatus(status); - - SAMLObjectBuilder statusCodeBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME); - StatusCode statusCode = statusCodeBuilder.buildObject(); - statusCode.setValue(StatusCode.RESPONDER_URI); - status.setStatusCode(statusCode); - - - StatusCode subStatusCode = statusCodeBuilder.buildObject(); - subStatusCode.setValue(StatusCode.AUTHN_FAILED_URI); - statusCode.setStatusCode(subStatusCode); - - - consumer.consume(samlResponse); - } - - @Test(expected=IdentityProviderAuthenticationException.class) - public void testConsumeRejectedAuthnRequestWithSubStatusCodeAndDetails() { - - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - - SAMLObjectBuilder statusBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME); - Status status = statusBuilder.buildObject(); - samlResponse.setStatus(status); - - SAMLObjectBuilder statusCodeBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME); - StatusCode statusCode = statusCodeBuilder.buildObject(); - statusCode.setValue(StatusCode.RESPONDER_URI); - status.setStatusCode(statusCode); - - - StatusCode subStatusCode = statusCodeBuilder.buildObject(); - subStatusCode.setValue(StatusCode.AUTHN_FAILED_URI); - statusCode.setStatusCode(subStatusCode); - - SAMLObjectBuilder statusMessageBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(StatusMessage.DEFAULT_ELEMENT_NAME); - StatusMessage message = statusMessageBuilder.buildObject(); - message.setMessage("some failure message"); - status.setStatusMessage(message); - - consumer.consume(samlResponse); - } - - private Response getSuccessfulResponse() { - SAMLObjectBuilder responseBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME); - Response samlResponse = responseBuilder.buildObject(); - samlResponse.setID(responseID); - samlResponse.setInResponseTo(inResponseTo); - samlResponse.setIssueInstant(responseIssueInstant); - samlResponse.setIssuer(generateIssuer(responseIssuer)); - - SAMLObjectBuilder statusBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME); - Status status = statusBuilder.buildObject(); - samlResponse.setStatus(status); - - SAMLObjectBuilder statusCodeBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME); - StatusCode statusCode = statusCodeBuilder.buildObject(); - statusCode.setValue(StatusCode.SUCCESS_URI); - status.setStatusCode(statusCode); - - return samlResponse; - } - - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumerAuthnResponseWithEmptyAssertions() { - - Response samlResponse = getSuccessfulResponse(); - - consumer.consume(samlResponse); - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumerAuthnResponseWithAssertionWithNoID() { - - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - //assertion.setID(assertionID); - - samlResponse.getAssertions().add(assertion); - - consumer.consume(samlResponse); - } - - - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumerAuthnResponseWithAssertionWithNoIssuer() { - - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - //assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - - samlResponse.getAssertions().add(assertion); - - - - consumer.consume(samlResponse); - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumerNoAuthnStatements() throws Exception { - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - //assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - samlResponse.getAssertions().add(assertion); - - consumer.consume(samlResponse); - } - - - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumeNoSubject() throws Exception { - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - //assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - - samlResponse.getAssertions().add(assertion); - - consumer.consume(samlResponse); - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumerNoIssuerInstant() throws Exception { - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - //assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - - samlResponse.getAssertions().add(assertion); - - - consumer.consume(samlResponse); - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumeNoAttributeStatements() throws Exception { - - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - //assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - samlResponse.getAssertions().add(assertion); - - consumer.consume(samlResponse); - } - - @Test(expected=ServiceProviderAuthenticationException.class) - public void testConsumeUnknownAttributeStatements() throws Exception { - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement("foo", authorities)); - assertion.setID(assertionID); - - samlResponse.getAssertions().add(assertion); - - consumer.consume(samlResponse); - } - - @Test - public void testConsume() throws Exception { - - Response samlResponse = getSuccessfulResponse(); - SAMLObjectBuilder assertionBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME); - Assertion assertion = assertionBuilder.buildObject(); - - assertion.setIssuer(generateIssuer(assertionIssuer)); - assertion.getAuthnStatements().add(generateAuthnStatement(authnInstant)); - assertion.setSubject(generateSubject(subjectName)); - assertion.setIssueInstant(assertionIssueInstant); - assertion.getAttributeStatements().add( generateAttributeStatement(GrantedAuthority.class.getName(), authorities)); - assertion.setID(assertionID); - - samlResponse.getAssertions().add(assertion); - - User user = consumer.consume(samlResponse); - - assertEquals(subjectName, user.getName()); - assertEquals(responseID,user.getAuthenticationResponseID()); - assertEquals(assertionID,user.getAuthenticationAssertionID()); - assertEquals(assertionIssuer,user.getAuthenticationAssertionIssuingEntityName()); - assertEquals(responseIssuer,user.getAuthenticationResponseIssuingEntityName()); - assertEquals(responseIssueInstant.getMillis(), user.getAuthenticationResponseIssueInstant().getMillis()); - assertEquals(assertionIssueInstant.getMillis(), user.getAuthenticationAssertionIssueInstant().getMillis()); - assertEquals(authnInstant.getMillis(), user.getAuthenticationIssueInstant().getMillis()); - - - } - - private AuthnStatement generateAuthnStatement(DateTime authnInstant) { - - - //Response/Assertion/AuthnStatement/AuthContext/AuthContextClassRef - AuthnContextClassRefBuilder authnContextClassRefBuilder = (AuthnContextClassRefBuilder) builderFactory.getBuilder(AuthnContextClassRef.DEFAULT_ELEMENT_NAME); - AuthnContextClassRef authnContextClassRef = authnContextClassRefBuilder.buildObject(); - //urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport - authnContextClassRef.setAuthnContextClassRef(AuthnContext.PASSWORD_AUTHN_CTX); - - //Response/Assertion/AuthnStatement/AuthContext - AuthnContextBuilder authnContextBuilder = (AuthnContextBuilder)builderFactory.getBuilder(AuthnContext.DEFAULT_ELEMENT_NAME); - AuthnContext authnContext = authnContextBuilder.buildObject(); - authnContext.setAuthnContextClassRef(authnContextClassRef); - - //Response/Assertion/AuthnStatement - AuthnStatementBuilder authnStatementBuilder = (AuthnStatementBuilder) builderFactory.getBuilder(AuthnStatement.DEFAULT_ELEMENT_NAME); - AuthnStatement authnStatement = authnStatementBuilder.buildObject(); - authnStatement.setAuthnContext(authnContext); - - authnStatement.setAuthnInstant(authnInstant); - - return authnStatement; - - } - - private Issuer generateIssuer(String issuerValue) { - SAMLObjectBuilder issuerBuilder = (SAMLObjectBuilder) builderFactory.getBuilder(Issuer.DEFAULT_ELEMENT_NAME); - Issuer issuer = issuerBuilder.buildObject(); - issuer.setValue(issuerValue); - return issuer; - } - - - private Subject generateSubject( String subjectName) { - - //Response/Assertion/Subject/NameID - NameIDBuilder nameIDBuilder = (NameIDBuilder) builderFactory.getBuilder(NameID.DEFAULT_ELEMENT_NAME); - NameID nameID = nameIDBuilder.buildObject(); - nameID.setValue(subjectName); - nameID.setFormat(NameIDType.UNSPECIFIED); - - //Response/Assertion/Subject - SubjectBuilder subjectBuilder = (SubjectBuilder)builderFactory.getBuilder(Subject.DEFAULT_ELEMENT_NAME); - Subject subject = subjectBuilder.buildObject(); - - subject.setNameID(nameID); - - SubjectConfirmationBuilder subjectConfirmationBuilder = (SubjectConfirmationBuilder)builderFactory.getBuilder(SubjectConfirmation.DEFAULT_ELEMENT_NAME); - SubjectConfirmation subjectConfirmation = subjectConfirmationBuilder.buildObject(); - subjectConfirmation.setMethod(SubjectConfirmation.METHOD_BEARER); - - SubjectConfirmationDataBuilder subjectConfirmationDataBuilder = (SubjectConfirmationDataBuilder)builderFactory.getBuilder(SubjectConfirmationData.DEFAULT_ELEMENT_NAME); - SubjectConfirmationData subjectConfirmationData = subjectConfirmationDataBuilder.buildObject(); - - subjectConfirmationData.setRecipient(recepientAssertionConsumerURL); - subjectConfirmationData.setInResponseTo(inResponseTo); - subjectConfirmationData.setNotOnOrAfter(validUntil); - subjectConfirmationData.setAddress(clientAddress); - - subjectConfirmation.setSubjectConfirmationData(subjectConfirmationData); - - subject.getSubjectConfirmations().add(subjectConfirmation); - - return subject; - } - - private AttributeStatement generateAttributeStatement(String attrName, List values) { - - AttributeStatementBuilder attributeStatementBuilder = (AttributeStatementBuilder) builderFactory.getBuilder(AttributeStatement.DEFAULT_ELEMENT_NAME); - AttributeStatement attributeStatement = attributeStatementBuilder.buildObject(); - - //Response/Assertion/AttributeStatement/Attribute - AttributeBuilder attributeBuilder = (AttributeBuilder) builderFactory.getBuilder(Attribute.DEFAULT_ELEMENT_NAME); - Attribute attribute = attributeBuilder.buildObject(); - attribute.setName(attrName); - - //urn:oasis:names:tc:SAML:2.0:attrname-format:basic - attribute.setNameFormat(Attribute.BASIC); - - - for (String value : values) { - //Response/Assertion/AttributeStatement/Attribute/AttributeValue - XSStringBuilder stringBuilder = (XSStringBuilder) Configuration.getBuilderFactory().getBuilder(XSString.TYPE_NAME); - XSString stringValue = stringBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME); - stringValue.setValue(value); - attribute.getAttributeValues().add(stringValue); - - } - - attributeStatement.getAttributes().add(attribute); - - return attributeStatement; - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SecurityPolicyDelegateTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SecurityPolicyDelegateTest.java deleted file mode 100644 index 60d1e490..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SecurityPolicyDelegateTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.ws.message.MessageContext; -import org.opensaml.ws.security.SecurityPolicyRule; - -import com.connsec.saml.binding.SecurityPolicyDelegate; - -public class SecurityPolicyDelegateTest { - - //args to class under test - @Mock MessageContext messageContext; - - - //collabs - List securityPolicyRules; - @Mock SecurityPolicyRule rule1; - @Mock SecurityPolicyRule rule2; - - //class under test - SecurityPolicyDelegate securityPolicyDelegate; - - - @Before - public void before() { - MockitoAnnotations.initMocks(this); - securityPolicyRules = new ArrayList(); - securityPolicyRules.add(rule1); - securityPolicyRules.add(rule2); - - securityPolicyDelegate = new SecurityPolicyDelegate(securityPolicyRules); - } - - @Test - public void testEvaluate() throws Exception { - - securityPolicyDelegate.evaluate(messageContext); - - verify(rule1).evaluate(messageContext); - verify(rule2).evaluate(messageContext); - - } - - @Test - public void testGetPolicyRules() throws Exception { - assertEquals(securityPolicyRules,securityPolicyDelegate.getPolicyRules()); - } - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SignatureSecurityPolicyRuleTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SignatureSecurityPolicyRuleTest.java deleted file mode 100644 index 1024d050..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/SignatureSecurityPolicyRuleTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; - -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.common.binding.security.SAMLProtocolMessageXMLSignatureSecurityPolicyRule; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.ws.message.MessageContext; -import org.opensaml.ws.security.SecurityPolicyException; -import org.opensaml.xml.Configuration; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.SecurityConfiguration; -import org.opensaml.xml.security.credential.CredentialResolver; -import org.opensaml.xml.security.keyinfo.KeyInfoCredentialResolver; -import org.opensaml.xml.signature.Signature; -import org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine; -import org.opensaml.xml.validation.ValidationException; - -import com.connsec.saml.binding.SignatureSecurityPolicyRule; - - -public class SignatureSecurityPolicyRuleTest { - - //collabs - @Mock CredentialResolver credentialResolver; - @Mock SAMLSignatureProfileValidator samlSignatureProfileValidator; - @Mock ExplicitKeySignatureTrustEngine trustEngine; - - - - //args to class under test - @Mock MessageContext messageContext; - @Mock Signature signature; - - @Mock Issuer notSingable; - @Mock AuthnRequest samlMessage; - private String messageIssuer = "the issuer"; - - //static state - @Mock SecurityConfiguration securityConfig; - @Mock KeyInfoCredentialResolver keyInfoCredentialResolver; - - //class under test - SignatureSecurityPolicyRule rule; - - @Before - public void before() { - MockitoAnnotations.initMocks(this); - rule = new SignatureSecurityPolicyRule(credentialResolver,samlSignatureProfileValidator); - } - - @Test - public void testAfterPropertiesSet() throws Exception { - - Configuration.setGlobalSecurityConfiguration(securityConfig); - when(securityConfig.getDefaultKeyInfoCredentialResolver()).thenReturn(keyInfoCredentialResolver); - - rule.afterPropertiesSet(); - assertNotNull(rule.getTrustEngine()); - } - - - @Test - public void testEvaluate() throws Exception { - rule.setTrustEngine(trustEngine); - when(messageContext.getInboundMessage()).thenReturn(samlMessage); - when(samlMessage.isSigned()).thenReturn(Boolean.TRUE); - when(samlMessage.getSignature()).thenReturn(signature); - when(messageContext.getInboundMessageIssuer()).thenReturn(messageIssuer ); - when(trustEngine.validate( eq(signature), (CriteriaSet) any())).thenReturn(Boolean.TRUE); - - rule.evaluate(messageContext); - - verify(samlSignatureProfileValidator).validate(signature); - - } - - @Test(expected=SecurityPolicyException.class) - public void testInboundMessageIsNotSignable() throws Exception { - when(messageContext.getInboundMessage()).thenReturn(notSingable); - rule.evaluate(messageContext); - } - - @Test(expected=SecurityPolicyException.class) - public void testInboundMessageIsNotSigned() throws Exception { - when(messageContext.getInboundMessage()).thenReturn(samlMessage); - when(samlMessage.isSigned()).thenReturn(Boolean.FALSE); - rule.evaluate(messageContext); - } - - @Test(expected=SecurityPolicyException.class) - public void testValidatorThrowsValdiationException() throws Exception { - rule.setTrustEngine(trustEngine); - when(messageContext.getInboundMessage()).thenReturn(samlMessage); - - when(samlMessage.isSigned()).thenReturn(Boolean.TRUE); - when(samlMessage.getSignature()).thenReturn(signature); - - doThrow(new ValidationException("ValidationException!")).when(samlSignatureProfileValidator).validate(signature); - rule.evaluate(messageContext); - - } - - @Test(expected=SecurityPolicyException.class) - public void testInvalidMessageSignature() throws Exception { - - rule.setTrustEngine(trustEngine); - when(samlMessage.isSigned()).thenReturn(Boolean.TRUE); - when(samlMessage.getSignature()).thenReturn(signature); - when(messageContext.getInboundMessage()).thenReturn(samlMessage); - - when(messageContext.getInboundMessageIssuer()).thenReturn(messageIssuer ); - when(trustEngine.validate( eq(signature), (CriteriaSet) any())).thenReturn(Boolean.FALSE); - - rule.evaluate(messageContext); - } - - @Test(expected=SecurityPolicyException.class) - public void testTruestEngineThrowsException() throws Exception { - - rule.setTrustEngine(trustEngine); - when(samlMessage.isSigned()).thenReturn(Boolean.TRUE); - when(samlMessage.getSignature()).thenReturn(signature); - when(messageContext.getInboundMessageIssuer()).thenReturn(messageIssuer ); - when(trustEngine.validate( eq(signature), (CriteriaSet) any())).thenThrow(new org.opensaml.xml.security.SecurityException("SecurityException!")); - - rule.evaluate(messageContext); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/AbstractXMLTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/AbstractXMLTest.java deleted file mode 100644 index fb409df4..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/AbstractXMLTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.xml; - -import java.util.HashMap; - -import org.custommonkey.xmlunit.SimpleNamespaceContext; -import org.custommonkey.xmlunit.XMLTestCase; -import org.custommonkey.xmlunit.XMLUnit; -import org.opensaml.Configuration; -import org.opensaml.DefaultBootstrap; -import org.opensaml.common.SAMLObject; -import org.opensaml.xml.io.Marshaller; -import org.opensaml.xml.io.MarshallerFactory; -import org.opensaml.xml.io.MarshallingException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Element; -import org.w3c.dom.bootstrap.DOMImplementationRegistry; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSSerializer; - -public abstract class AbstractXMLTest extends XMLTestCase { - - private final static Logger logger = LoggerFactory.getLogger(AbstractXMLTest.class); - -// used to serialize the DOM to a string for inspection - protected LSSerializer writer; - protected DOMImplementationLS domImpl; - - private boolean initialized; - - public AbstractXMLTest() { - super(); - setUpOnce(); - } - - public AbstractXMLTest(String name) { - super(); - setUpOnce(); - } - - //note that we are extending XMLTestCase, can't put this in a @BeforeClass - public void setUpOnce() { - try { - // init open saml - DefaultBootstrap.bootstrap(); - - // init xml handling - DOMImplementationRegistry registry = DOMImplementationRegistry - .newInstance(); - - domImpl = (DOMImplementationLS) registry.getDOMImplementation("LS"); - writer = domImpl.createLSSerializer(); - initialized = true; - - } catch (Exception ex) { - logger.error("Could not initialize test env", ex); - initialized = false; - } - } - - @Override - protected void setUp() throws Exception { - - assertTrue("Failure initializing open saml ",initialized); - super.setUp(); - - //tell XMLUnit about the expected name spaces - HashMap m = new HashMap(); - m.put("saml2a", "urn:oasis:names:tc:SAML:2.0:assertion"); - m.put("saml2p", "urn:oasis:names:tc:SAML:2.0:protocol"); - m.put("saml2md", "urn:oasis:names:tc:SAML:2.0:metadata"); - //m.put("saml2p", "urn:oasis:names:tc:SAML:2.0:protocol"); - SimpleNamespaceContext ctx = new SimpleNamespaceContext(m); - XMLUnit.setXpathNamespaceContext(ctx); - } - - protected String getAsXMLString(SAMLObject response) throws MarshallingException { - MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory(); - Marshaller marshaller = marshallerFactory.getMarshaller(response); - - Element root = marshaller.marshall(response); - - return writer.writeToString(root); - } - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/EndpointGeneratorTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/EndpointGeneratorTest.java deleted file mode 100644 index 1705b1c0..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/EndpointGeneratorTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.xml; - - -import org.opensaml.Configuration; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.saml2.metadata.SingleSignOnService; -import org.opensaml.xml.io.Marshaller; -import org.opensaml.xml.io.MarshallerFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Element; - -public class EndpointGeneratorTest extends AbstractXMLTest { - - private final static Logger logger = LoggerFactory.getLogger(EndpointGeneratorTest.class); - - EndpointGenerator endpointGenerator; - - @Override - protected void setUp() throws Exception { - super.setUp(); - endpointGenerator = new EndpointGenerator(); - } - - public void testGenerateEndPoint() throws Exception { - Endpoint endpoint = endpointGenerator.generateEndpoint(SingleSignOnService.DEFAULT_ELEMENT_NAME,"https://them.com/destination", "https://me.com/reply"); - - assertNotNull("Endpoint generator generated a null endpoint", endpoint); - - MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory(); - Marshaller marshaller = marshallerFactory.getMarshaller(endpoint); - - Element root = marshaller.marshall(endpoint); - - String xml = writer.writeToString(root); - logger.debug("xml is {}", xml); - - assertNotNull("the DOM could not be serialized into XML", xml); - - assertXpathExists( - "/saml2md:SingleSignOnService[@Location='https://them.com/destination']", - xml); - assertXpathExists( - "/saml2md:SingleSignOnService[@ResponseLocation]", - xml); - assertXpathExists( - "/saml2md:SingleSignOnService[@ResponseLocation='https://me.com/reply']", - xml); - } - - public void testGenerateEndPointNoResponseLocation() throws Exception{ - Endpoint endpoint = endpointGenerator.generateEndpoint(SingleSignOnService.DEFAULT_ELEMENT_NAME,"https://them.com/destination", null); - - assertNotNull("Endpoint generator generated a null endpoint", endpoint); - - MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory(); - Marshaller marshaller = marshallerFactory.getMarshaller(endpoint); - - Element root = marshaller.marshall(endpoint); - - String xml = writer.writeToString(root); - logger.debug("xml is {}", xml); - - assertNotNull("the DOM could not be serialized into XML", xml); - - assertXpathExists( - "/saml2md:SingleSignOnService[@Location='https://them.com/destination']", - xml); - - assertXpathNotExists( - "/saml2md:SingleSignOnService[@ResponseLocation]", - xml); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/IssuerGeneratorTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/IssuerGeneratorTest.java deleted file mode 100644 index 01333a76..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/IssuerGeneratorTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.saml.xml; - - -import org.opensaml.saml2.core.Issuer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class IssuerGeneratorTest extends AbstractXMLTest { - - private final static Logger logger = LoggerFactory - .getLogger(IssuerGeneratorTest.class); - - IssuerGenerator generator; - String issuerName = "some guy"; - - - @Override - protected void setUp() throws Exception { - super.setUp(); - generator = new IssuerGenerator(issuerName); - } - - - public void testGenerate() throws Exception { - - Issuer issuer = generator.generateIssuer(); - assertNotNull(issuer); - - String xml = getAsXMLString(issuer); - - logger.debug("AuthnRequest is: \n{}", xml); - - assertXpathExists( "/saml2a:Issuer[@Format='urn:oasis:names:tc:SAML:2.0:nameid-format:entity']", xml); - assertXpathExists("/saml2a:Issuer['"+issuer+"']",xml); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/package-info.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/package-info.java deleted file mode 100644 index 061eb857..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/saml/xml/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - */ -/** - * @author Administrator - * - */ -package com.connsec.saml.xml; \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/RealAuthenticationFailureHandlerTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/RealAuthenticationFailureHandlerTest.java deleted file mode 100644 index a7f35322..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/RealAuthenticationFailureHandlerTest.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.connsec.spring; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; -import org.springframework.security.web.savedrequest.RequestCache; -import org.springframework.security.web.savedrequest.SavedRequest; - -import com.connsec.spring.IdentityProviderAuthenticationException; -import com.connsec.spring.RealAuthenticationFailureHandler; -import com.connsec.spring.ServiceProviderAuthenticationException; - -public class RealAuthenticationFailureHandlerTest { - - //args to class under test - @Mock HttpServletRequest request; - @Mock HttpServletResponse response; - @Mock IdentityProviderAuthenticationException idpException; - @Mock ServiceProviderAuthenticationException spException; - @Mock HttpSession session; - - //collabs - @Mock RequestCache requestCache; - - @Mock SavedRequest savedRequest; - private String redirectURL = "http://sp/protected"; - - //class under test - RealAuthenticationFailureHandler handler; - - - @Before - public void before() { - - MockitoAnnotations.initMocks(this); - - handler = new RealAuthenticationFailureHandler(requestCache); - } - - @Test - public void testOnAuthnFailureIdentityProviderException() throws Exception { - - when(requestCache.getRequest(request, response)).thenReturn(savedRequest); - when(savedRequest.getRedirectUrl()).thenReturn(redirectURL); - - handler.onAuthenticationFailure(request, response, idpException); - - verify(response).sendRedirect(redirectURL); - } - - @Test - public void testOnAuthnFailureServiceProviderException() throws Exception { - - when(requestCache.getRequest(request, response)).thenReturn(savedRequest); - when(savedRequest.getRedirectUrl()).thenReturn(redirectURL); - - handler.onAuthenticationFailure(request, response, spException); - - verify(response).sendError(HttpServletResponse.SC_FORBIDDEN); - } - - - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointIntTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointIntTest.java deleted file mode 100644 index 8b293e23..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointIntTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import javax.servlet.http.HttpServletRequest; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.DefaultBootstrap; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.security.core.AuthenticationException; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import com.connsec.spring.SAMLAuthenticationEntryPoint; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/spring/applicationContext-property-mappings.xml","file:src/main/webapp/WEB-INF/spring/applicationContext-sp-config.xml","file:src/main/webapp/WEB-INF/spring/applicationContext-spring-security.xml"}) - -public class SAMLAuthenticationEntryPointIntTest { - - private final static Logger logger = LoggerFactory - .getLogger(SAMLAuthenticationEntryPointIntTest.class); - - //args to class under test - @Mock private HttpServletRequest request; - MockHttpServletResponse response; - @Mock AuthenticationException authException; - - private SAMLAuthenticationEntryPoint samlAuthenticationEntryPoint; - - @Autowired - public void setSamlAuthenticationEntryPoint( - SAMLAuthenticationEntryPoint samlAuthenticationEntryPoint) { - this.samlAuthenticationEntryPoint = samlAuthenticationEntryPoint; - } - - @Before - public void before() throws Exception { - - MockitoAnnotations.initMocks(this); - response = new MockHttpServletResponse(); - - } - - @BeforeClass - public static void beforeClass() throws Exception { - DefaultBootstrap.bootstrap(); - } - - @Test - public void testCommence() throws Exception { - - samlAuthenticationEntryPoint.commence(request, response, authException); - - assertNotNull("response.getContentAsString was null", response.getContentAsString()); - - logger.debug("The response was: {}", response.getContentAsString()); - assertTrue("The response did not contain a SAMLRequest", response.getContentAsString().contains("SAMLRequest")); - - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointTest.java deleted file mode 100644 index 643aaad2..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLAuthenticationEntryPointTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.Matchers.any; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.saml2.metadata.SingleSignOnService; -import org.opensaml.ws.message.encoder.MessageEncodingException; -import org.opensaml.xml.security.CriteriaSet; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.credential.CredentialResolver; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.AuthenticationException; - -import com.connsec.saml.AuthnRequestGenerator; -import com.connsec.saml.binding.BindingAdapter; -import com.connsec.saml.util.IDService; -import com.connsec.saml.util.TimeService; -import com.connsec.saml.xml.EndpointGenerator; -import com.connsec.spring.SAMLAuthenticationEntryPoint; - -public class SAMLAuthenticationEntryPointTest { - - private final static Logger logger = LoggerFactory.getLogger(SAMLAuthenticationEntryPointTest.class); - - //args to class under test - @Mock private HttpServletRequest request; - @Mock private HttpServletResponse response; - @Mock AuthenticationException authException; - - - //collaborators - final String singleSignOnServiceURL = "https://idp.com/ssoEntryPoint"; - final String assertionConsumerServiceURL = "https://sp.com/assertionConsumerService"; - final String issuer ="https://sp.com"; - @Mock EndpointGenerator endpointGenerator; - @Mock BindingAdapter bindingAdapter; - @Mock AuthnRequestGenerator authnRequestGenerator; - @Mock TimeService timeService; - @Mock IDService idService; - @Mock CredentialResolver credentialResolver; - - //return values of collabs - @Mock Endpoint endpoint; - @Mock AuthnRequest authnReqeust; - @Mock Credential signingCredential; - - //class under test - @InjectMocks SAMLAuthenticationEntryPoint authEntryPoint; - - @Before - public void before() throws Exception { - - authEntryPoint = new SAMLAuthenticationEntryPoint(timeService, idService, assertionConsumerServiceURL); - authEntryPoint.setAssertionConsumerServiceURL(assertionConsumerServiceURL); - authEntryPoint.setSingleSignOnServiceURL(singleSignOnServiceURL); - MockitoAnnotations.initMocks(this); - } - - @Test - public void testCommence() throws Exception { - - when(endpointGenerator.generateEndpoint(SingleSignOnService.DEFAULT_ELEMENT_NAME, singleSignOnServiceURL, assertionConsumerServiceURL)).thenReturn(endpoint); - when(authnRequestGenerator.generateAuthnRequest(singleSignOnServiceURL, assertionConsumerServiceURL)).thenReturn(authnReqeust); - - authEntryPoint.commence(request, response, authException); - - verify(bindingAdapter).sendSAMLMessage(authnReqeust, endpoint, signingCredential, response); - - } - - @Test - public void testBindingAdapterThrowsMessageEncodingException() throws Exception { - - when(endpointGenerator.generateEndpoint(SingleSignOnService.DEFAULT_ELEMENT_NAME, singleSignOnServiceURL, assertionConsumerServiceURL)).thenReturn(endpoint); - when(authnRequestGenerator.generateAuthnRequest(singleSignOnServiceURL, assertionConsumerServiceURL)).thenReturn(authnReqeust); - - doThrow(new MessageEncodingException("MessageEncodingException!")).when(bindingAdapter).sendSAMLMessage(authnReqeust, endpoint, signingCredential, response); - - authEntryPoint.commence(request, response, authException); - - verify(response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } - - @Test - public void testAfterPropertiesSet() throws Exception { - - when(credentialResolver.resolveSingle((CriteriaSet) any())).thenReturn(signingCredential); - - authEntryPoint.authnRequestGenerator = null; - authEntryPoint.endpointGenerator = null; - - authEntryPoint.afterPropertiesSet(); - - assertTrue(authEntryPoint.endpointGenerator != null); - assertTrue(authEntryPoint.authnRequestGenerator != null); - - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilterTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilterTest.java deleted file mode 100644 index 7e2eea69..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProcessingFilterTest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. - - -package com.connsec.spring; - -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.isA; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import javax.servlet.FilterChain; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.common.binding.SAMLMessageContext; -import org.opensaml.saml2.core.LogoutRequest; -import org.opensaml.saml2.core.Response; -import org.opensaml.ws.message.decoder.MessageDecodingException; -import org.opensaml.xml.security.SecurityException; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.session.SessionRegistry; -import org.springframework.security.web.authentication.AuthenticationFailureHandler; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; -import org.springframework.security.web.authentication.RememberMeServices; - -import com.connsec.saml.binding.BindingAdapter; -import com.connsec.spring.SAMLAuthenticationToken; -import com.connsec.spring.SAMLResponseAuthenticationProcessingFilter; -import com.connsec.spring.ServiceProviderAuthenticationException; -import com.connsec.spring.User; - - -public class SAMLResponseAuthenticationProcessingFilterTest { - - - //args to class under test - @Mock private HttpServletRequest request; - @Mock private HttpServletResponse response; - @Mock private FilterChain filterChain; - - //derived - @Mock private SAMLMessageContext messageContext; - @Mock private Response samlResponse; - @Mock private LogoutRequest logoutRequest; - private String b64EncodedSAMLMessage = "some b64 encoded message"; - @Mock HttpSession session; - @Mock User principal; - - @Mock SAMLAuthenticationToken authResult; - - //static state - @Mock SecurityContext context; - - //collabs - String filterProcessURI = "/AssertionConsumerService"; - String contextPath = "/sp"; - - @Mock private AuthenticationManager authenticationManager; - @Mock private BindingAdapter bindingAdapter; - @Mock private AuthenticationSuccessHandler authenticationSuccessHandler; - @Mock private AuthenticationFailureHandler authenticationFailureHandler; - @Mock private ApplicationEventPublisher eventPublisher; - @Mock private SessionRegistry sessionRegistry; - @Mock RememberMeServices rememberMeServices; - - //class under test - @InjectMocks SAMLResponseAuthenticationProcessingFilter filter; - - @Before - public void before() throws Exception { - - filter = new SAMLResponseAuthenticationProcessingFilter(filterProcessURI); - MockitoAnnotations.initMocks(this); - - SecurityContextHolder.setContext(context); - } - - - @Test - public void testdoFilterHttpNotAnAuthRequest() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath + "/someplace/else.ht"); - when(request.getContextPath()).thenReturn(contextPath); - - filter.doFilter(request, response, filterChain); - - verify(authenticationManager, never()).authenticate((Authentication) any()); - verify(filterChain).doFilter(request, response); - } - - @Test - public void testdoFilterBindingAdapterThrowsMessageDecodingException() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath+filterProcessURI); - when(request.getContextPath()).thenReturn(contextPath); - when(bindingAdapter.extractSAMLMessageContext(request)).thenThrow(new MessageDecodingException("MessageDecodingException!")); - - filter.doFilter(request, response, filterChain); - - verify(filterChain, never()).doFilter(request, response); - verify(authenticationFailureHandler).onAuthenticationFailure(eq(request), eq(response), isA(ServiceProviderAuthenticationException.class)); - } - - @Test - public void testdoFilterBindingAdapterThrowsSecurityException() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath+filterProcessURI); - when(request.getContextPath()).thenReturn(contextPath); - when(bindingAdapter.extractSAMLMessageContext(request)).thenThrow(new SecurityException("SecurityException!")); - - filter.doFilter(request, response, filterChain); - - verify(filterChain, never()).doFilter(request, response); - verify(authenticationFailureHandler).onAuthenticationFailure(eq(request), eq(response), isA(ServiceProviderAuthenticationException.class)); - } - - @Test - public void testdoFilterValidMessageIsNotASAMLResponse() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath+filterProcessURI); - when(request.getContextPath()).thenReturn(contextPath); - when(bindingAdapter.extractSAMLMessageContext(request)).thenReturn(messageContext); - when(messageContext.getInboundMessage()).thenReturn(logoutRequest); - - filter.doFilter(request, response, filterChain); - - verify(authenticationManager, never()).authenticate((Authentication) any()); - verify(authenticationFailureHandler).onAuthenticationFailure(eq(request), eq(response), isA(ServiceProviderAuthenticationException.class)); - - } - - - @Test - public void testdoFilterHttpAuthMngrThrowsAuthnException() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath+filterProcessURI); - when(request.getContextPath()).thenReturn(contextPath); - when(bindingAdapter.extractSAMLMessageContext(request)).thenReturn(messageContext); - when(messageContext.getInboundSAMLMessage()).thenReturn(samlResponse); - - doThrow(new BadCredentialsException("BadCreds!")).when(authenticationManager).authenticate((Authentication) any()); - - filter.doFilter(request, response, filterChain); - - verify(authenticationFailureHandler).onAuthenticationFailure(eq(request), eq(response), (AuthenticationException) any()); - - } - - @Test - public void testAttemptAuthentication() throws Exception { - - when(request.getRequestURI()).thenReturn(contextPath+filterProcessURI); - when(request.getContextPath()).thenReturn(contextPath); - when(bindingAdapter.extractSAMLMessageContext(request)).thenReturn(messageContext); - when(messageContext.getInboundSAMLMessage()).thenReturn(samlResponse); - when(bindingAdapter.extractSAMLMessage(request)).thenReturn(b64EncodedSAMLMessage); - - when(authenticationManager.authenticate((Authentication) any())).thenReturn(authResult); - - filter.doFilter(request, response, filterChain); - - verify(authenticationSuccessHandler).onAuthenticationSuccess(request, response, authResult); - - - } - -} -*/ \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProviderTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProviderTest.java deleted file mode 100644 index 638d5156..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SAMLResponseAuthenticationProviderTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.connsec.spring; - -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; - -import java.util.ArrayList; -import java.util.Collection; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.saml2.core.Response; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.GrantedAuthorityImpl; - -import com.connsec.saml.AssertionConsumer; -import com.connsec.spring.SAMLAuthenticationToken; -import com.connsec.spring.SAMLResponseAuthenticationProvider; -import com.connsec.spring.User; - -public class SAMLResponseAuthenticationProviderTest { - - //args to class under test - @Mock SAMLAuthenticationToken submitted; - String credentials ="some b64 encoded message"; - @Mock Response response; - @Mock Object details; - - //collabs - @Mock AssertionConsumer assertionConsumer; - - //return values of collabs - @Mock User user; - Collection authorities; - - //class under test - SAMLResponseAuthenticationProvider authenticationProvider; - - - @Before - public void before() throws Exception { - - MockitoAnnotations.initMocks(this); - authenticationProvider = new SAMLResponseAuthenticationProvider(assertionConsumer); - - authorities = new ArrayList(); - authorities.add(new GrantedAuthorityImpl("ROLE_USER")); - } - - @Test - public void testAuthenticate() throws Exception { - - when(submitted.getCredentials()).thenReturn(credentials); - when(submitted.getDetails()).thenReturn(details); - when(submitted.getPrincipal()).thenReturn(response); - - when(assertionConsumer.consume(response)).thenReturn(user); - when(user.getAuthorities()).thenReturn(authorities); - - Authentication authentication = authenticationProvider.authenticate(submitted); - - assertEquals(user, authentication.getPrincipal()); - assertEquals(credentials, authentication.getCredentials()); - assertEquals(details, authentication.getDetails()); - assertEquals(authorities, authentication.getAuthorities()); - - } - - - @Test - public void testSupports() throws Exception { - assertTrue(authenticationProvider.supports(SAMLAuthenticationToken.class)); - } - - @Test - public void testDoesNotSupport() throws Exception { - assertFalse(authenticationProvider.supports(UsernamePasswordAuthenticationToken.class)); - } - -} diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SSOResponseIntTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SSOResponseIntTest.java deleted file mode 100644 index e66861d9..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/SSOResponseIntTest.java +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. - - -package com.connsec.spring; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.when; - -import java.util.Iterator; - -import javax.servlet.FilterChain; -import javax.servlet.RequestDispatcher; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensaml.common.binding.security.IssueInstantRule; -import org.opensaml.util.storage.MapBasedStorageService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import com.connsec.saml.AbstractRequestIntTest; -import com.connsec.saml.binding.SecurityPolicyDelegate; -import com.connsec.spring.SAMLResponseAuthenticationProcessingFilter; -import com.connsec.saml.AbstractRequestIntTest; - -*//** - * Test the SAMLResponseAuthenticationProcessingFilter inside a Spring container. - * - * Try to consume an authnResponse that was generated by SSOIntTest in the idp project. - * - * @author jcox - * - *//* -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/spring/applicationContext-property-mappings.xml","file:src/main/webapp/WEB-INF/spring/applicationContext-sp-config.xml","file:src/main/webapp/WEB-INF/spring/applicationContext-spring-security.xml"}) -public class SSOResponseIntTest extends AbstractRequestIntTest { - - - private final static Logger logger = LoggerFactory - .getLogger(SSOResponseIntTest.class); - - public static final String SAML_RESPONSE_POST_PARAM = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9sb2NhbGhvc3Q6ODA4MC9zcC9Bc3NlcnRpb25Db25zdW1lclNlcnZpY2UiIElEPSIxYzdiNjlkYi03Nzc5LTRmZDItOWQ5NS01MWI4YzU4OWQ4OWEiIEluUmVzcG9uc2VUbz0iZWQ4NjI4M2MtM2FlOS00MGM5LTkxNTktMGMwZTcxMDQ3OTBiIiBJc3N1ZUluc3RhbnQ9IjIwMTAtMTItMTZUMjM6MjQ6MDAuNDU2WiIgVmVyc2lvbj0iMi4wIj48c2FtbDI6SXNzdWVyIHhtbG5zOnNhbWwyPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXNzZXJ0aW9uIiBGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpuYW1laWQtZm9ybWF0OmVudGl0eSI+aWRwPC9zYW1sMjpJc3N1ZXI+PGRzOlNpZ25hdHVyZSB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+CjxkczpTaWduZWRJbmZvPgo8ZHM6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMTAveG1sLWV4Yy1jMTRuIyIvPgo8ZHM6U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3JzYS1zaGExIi8+CjxkczpSZWZlcmVuY2UgVVJJPSIjMWM3YjY5ZGItNzc3OS00ZmQyLTlkOTUtNTFiOGM1ODlkODlhIj4KPGRzOlRyYW5zZm9ybXM+CjxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjZW52ZWxvcGVkLXNpZ25hdHVyZSIvPgo8ZHM6VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8xMC94bWwtZXhjLWMxNG4jIj48ZWM6SW5jbHVzaXZlTmFtZXNwYWNlcyB4bWxuczplYz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8xMC94bWwtZXhjLWMxNG4jIiBQcmVmaXhMaXN0PSJkcyBzYW1sMiBzYW1sMnAgeHMiLz48L2RzOlRyYW5zZm9ybT4KPC9kczpUcmFuc2Zvcm1zPgo8ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3NoYTEiLz4KPGRzOkRpZ2VzdFZhbHVlPkZwR1hGQXBlbWVXVGJjRld6cFZBUmE4VWx3dz08L2RzOkRpZ2VzdFZhbHVlPgo8L2RzOlJlZmVyZW5jZT4KPC9kczpTaWduZWRJbmZvPgo8ZHM6U2lnbmF0dXJlVmFsdWU+CkdVT1dsVTRDNHV5d1Q5eFI0RGlub1lLK0Q1aER5N3JGZWhrVHBTeXV3S0JTV0N3dFRpcnFCcHVDYXdFUFhBaFJvN3A5anloV1NIOE0KUldhdVVWUlUwYTBlS2Z6Mk9kMEdIdkx5WjRvTGdNMUdVYmVLQnVLeFlXUGtJaCtvVnI1aWhlT3ozVzFEejRUZTVSeEpCT01lMlFVTgovdWxVUjB3dmFDM25LMWxQSDlrPQo8L2RzOlNpZ25hdHVyZVZhbHVlPgo8ZHM6S2V5SW5mbz48ZHM6WDUwOURhdGE+PGRzOlg1MDlDZXJ0aWZpY2F0ZT5NSUlDU2pDQ0FiTUNCRXl4eFhnd0RRWUpLb1pJaHZjTkFRRUZCUUF3YkRFa01DSUdDU3FHU0liM0RRRUpBUllWYW1GdFpYTXVjeTVqCmIzaEFaMjFoYVd3dVkyOXRNUXN3Q1FZRFZRUUdFd0pWVXpFYU1CZ0dBMVVFQ2d3UlNXUmxiblJwZEhrZ1VISnZkbWxrWlhJeEREQUsKQmdOVkJBc01BMmxrY0RFTk1Bc0dBMVVFQXd3RWFtTnZlREFlRncweE1ERXdNVEF4TXpVME1EQmFGdzB5TURFd01EY3hNelUwTURCYQpNR3d4SkRBaUJna3Foa2lHOXcwQkNRRVdGV3BoYldWekxuTXVZMjk0UUdkdFlXbHNMbU52YlRFTE1Ba0dBMVVFQmhNQ1ZWTXhHakFZCkJnTlZCQW9NRVVsa1pXNTBhWFI1SUZCeWIzWnBaR1Z5TVF3d0NnWURWUVFMREFOcFpIQXhEVEFMQmdOVkJBTU1CR3BqYjNnd2daOHcKRFFZSktvWklodmNOQVFFQkJRQURnWTBBTUlHSkFvR0JBSXQzM29yQUw2TWFqaEE4amVYYWY4YVBiSVgyNGRsdjBId0JCbWRMQnprcgpPMEkzYkVMdEtTemJLRkJrSXdRWkthRkhZZFQ3Y3hteTFlcHdmZllzWDJJcGd1ejk5d0dnSDkyR2lXQ0x1UHIxNEhxTUF6L3d4LzFwCkFGRkVSYTVyeGFkcTBKeG1rMVNGOGdkejdGdG9RT1QwV1VuSWNzMjB5WHRhMEFicWQxQXhBZ01CQUFFd0RRWUpLb1pJaHZjTkFRRUYKQlFBRGdZRUFPQ3NnQ0I3emMvT3JZOHU1NG5VYjJhcEpFWjIwc1NPNDhpbHpuNVBvR0JReEZaSklnMEUwZUJUZkNUTkdRdUY1YW5JNApOWjdRMGdUUlQ4SUJ4ZWlQaGtzeis1Tkc0ZUNiNis0VnlLSnN6eDZyWTdTNnVxLzA4TjNFTXJ1NWp5TlZFbi9vM0YxUXB3dGxNRGlwCkg4cytkcHVSNnNFQWNwdWdRWUJINkYxTWZJMD08L2RzOlg1MDlDZXJ0aWZpY2F0ZT48L2RzOlg1MDlEYXRhPjwvZHM6S2V5SW5mbz48L2RzOlNpZ25hdHVyZT48c2FtbDJwOlN0YXR1cz48c2FtbDJwOlN0YXR1c0NvZGUgVmFsdWU9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpzdGF0dXM6U3VjY2VzcyIvPjwvc2FtbDJwOlN0YXR1cz48c2FtbDI6QXNzZXJ0aW9uIHhtbG5zOnNhbWwyPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXNzZXJ0aW9uIiBJRD0iYTAxNTYyZjUtMGY0YS00N2M4LTk1MTMtNTJkY2UzMmEzY2Q1IiBJc3N1ZUluc3RhbnQ9IjIwMTAtMTItMTZUMjM6MjQ6MDAuNDU2WiIgVmVyc2lvbj0iMi4wIj48c2FtbDI6SXNzdWVyIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6ZW50aXR5Ij5pZHA8L3NhbWwyOklzc3Vlcj48c2FtbDI6U3ViamVjdD48c2FtbDI6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6MS4xOm5hbWVpZC1mb3JtYXQ6dW5zcGVjaWZpZWQiPmR1ZGVAaWRwLmNvbTwvc2FtbDI6TmFtZUlEPjxzYW1sMjpTdWJqZWN0Q29uZmlybWF0aW9uIE1ldGhvZD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmNtOmJlYXJlciI+PHNhbWwyOlN1YmplY3RDb25maXJtYXRpb25EYXRhIEFkZHJlc3M9IjEwLjQwLjEyNS4xIiBJblJlc3BvbnNlVG89ImVkODYyODNjLTNhZTktNDBjOS05MTU5LTBjMGU3MTA0NzkwYiIgTm90T25PckFmdGVyPSIyMDEwLTEyLTE2VDIzOjI1OjMwLjQ1MloiIFJlY2lwaWVudD0iaHR0cHM6Ly9sb2NhbGhvc3Q6ODA4MC9zcC9Bc3NlcnRpb25Db25zdW1lclNlcnZpY2UiLz48L3NhbWwyOlN1YmplY3RDb25maXJtYXRpb24+PC9zYW1sMjpTdWJqZWN0PjxzYW1sMjpBdXRoblN0YXRlbWVudCBBdXRobkluc3RhbnQ9IjIwMTAtMTItMTZUMjM6MjM6NDIuOTYwWiI+PHNhbWwyOkF1dGhuQ29udGV4dD48c2FtbDI6QXV0aG5Db250ZXh0Q2xhc3NSZWY+dXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFjOmNsYXNzZXM6UGFzc3dvcmQ8L3NhbWwyOkF1dGhuQ29udGV4dENsYXNzUmVmPjwvc2FtbDI6QXV0aG5Db250ZXh0Pjwvc2FtbDI6QXV0aG5TdGF0ZW1lbnQ+PHNhbWwyOkF0dHJpYnV0ZVN0YXRlbWVudD48c2FtbDI6QXR0cmlidXRlIE5hbWU9Im9yZy5zcHJpbmdmcmFtZXdvcmsuc2VjdXJpdHkuY29yZS5HcmFudGVkQXV0aG9yaXR5IiBOYW1lRm9ybWF0PSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXR0cm5hbWUtZm9ybWF0OmJhc2ljIj48c2FtbDI6QXR0cmlidXRlVmFsdWUgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6dHlwZT0ieHM6c3RyaW5nIj5ST0xFXzI8L3NhbWwyOkF0dHJpYnV0ZVZhbHVlPjxzYW1sMjpBdHRyaWJ1dGVWYWx1ZSB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTp0eXBlPSJ4czpzdHJpbmciPlJPTEVfMTwvc2FtbDI6QXR0cmlidXRlVmFsdWU+PC9zYW1sMjpBdHRyaWJ1dGU+PC9zYW1sMjpBdHRyaWJ1dGVTdGF0ZW1lbnQ+PC9zYW1sMjpBc3NlcnRpb24+PC9zYW1sMnA6UmVzcG9uc2U+"; - public static final String SIGNATURE_POST_PARAM ="CRpHAxnO37U5Ld3vqJkOHnYKIeGe6UqACjHBbvj9g9jlcOJDTpKo0rXJow0TSa8QjVySzPmJ2vHc+T8CSYpV+YfRGUL27zzevpzPA7BtDaJ/Ft8xkqfYEIuueekcqhrGWxkDhD8CTcloBZEDEn8dh7CCOocqTGFo7qumpOXC0Is="; - public static final String SIG_ALG_POST_PARAM ="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; - public static final String KEY_INFO_POST_PARAM ="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48ZHM6S2V5SW5mbyB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+PGRzOlg1MDlEYXRhPjxkczpYNTA5Q2VydGlmaWNhdGU+TUlJQ1NqQ0NBYk1DQkV5eHhYZ3dEUVlKS29aSWh2Y05BUUVGQlFBd2JERWtNQ0lHQ1NxR1NJYjNEUUVKQVJZVmFtRnRaWE11Y3k1agpiM2hBWjIxaGFXd3VZMjl0TVFzd0NRWURWUVFHRXdKVlV6RWFNQmdHQTFVRUNnd1JTV1JsYm5ScGRIa2dVSEp2ZG1sa1pYSXhEREFLCkJnTlZCQXNNQTJsa2NERU5NQXNHQTFVRUF3d0VhbU52ZURBZUZ3MHhNREV3TVRBeE16VTBNREJhRncweU1ERXdNRGN4TXpVME1EQmEKTUd3eEpEQWlCZ2txaGtpRzl3MEJDUUVXRldwaGJXVnpMbk11WTI5NFFHZHRZV2xzTG1OdmJURUxNQWtHQTFVRUJoTUNWVk14R2pBWQpCZ05WQkFvTUVVbGtaVzUwYVhSNUlGQnliM1pwWkdWeU1Rd3dDZ1lEVlFRTERBTnBaSEF4RFRBTEJnTlZCQU1NQkdwamIzZ3dnWjh3CkRRWUpLb1pJaHZjTkFRRUJCUUFEZ1kwQU1JR0pBb0dCQUl0MzNvckFMNk1hamhBOGplWGFmOGFQYklYMjRkbHYwSHdCQm1kTEJ6a3IKTzBJM2JFTHRLU3piS0ZCa0l3UVpLYUZIWWRUN2N4bXkxZXB3ZmZZc1gySXBndXo5OXdHZ0g5MkdpV0NMdVByMTRIcU1Bei93eC8xcApBRkZFUmE1cnhhZHEwSnhtazFTRjhnZHo3RnRvUU9UMFdVbkljczIweVh0YTBBYnFkMUF4QWdNQkFBRXdEUVlKS29aSWh2Y05BUUVGCkJRQURnWUVBT0NzZ0NCN3pjL09yWTh1NTRuVWIyYXBKRVoyMHNTTzQ4aWx6bjVQb0dCUXhGWkpJZzBFMGVCVGZDVE5HUXVGNWFuSTQKTlo3UTBnVFJUOElCeGVpUGhrc3orNU5HNGVDYjYrNFZ5S0pzeng2clk3UzZ1cS8wOE4zRU1ydTVqeU5WRW4vbzNGMVFwd3RsTURpcApIOHMrZHB1UjZzRUFjcHVnUVlCSDZGMU1mSTA9PC9kczpYNTA5Q2VydGlmaWNhdGU+PC9kczpYNTA5RGF0YT48L2RzOktleUluZm8+"; - - - //args to class under test - @Mock private HttpServletRequest request; - MockHttpServletResponse response; - - @Mock HttpSession session; - @Mock FilterChain filterChain; - - SAMLResponseAuthenticationProcessingFilter filter; - - //handle to replay message map - private MapBasedStorageService mapBasedStorageService; - //handle to turn off time expiry - private IssueInstantRule issueInstantRule; - private SecurityPolicyDelegate securityPolicyDelegate; - - private String filterURL = "https://localhost:8080/sp/AssertionConsumerService" ; - - - @Autowired - public void setFilter(SAMLResponseAuthenticationProcessingFilter filter) { - this.filter = filter; - } - - @Autowired - public void setSecurityPolicyDelegate( - SecurityPolicyDelegate securityPolicyDelegate) { - this.securityPolicyDelegate = securityPolicyDelegate; - } - - @Autowired - public void setMapBasedStorageService( - MapBasedStorageService mapBasedStorageService) { - this.mapBasedStorageService = mapBasedStorageService; - } - - @Autowired - public void setIssueInstantRule(IssueInstantRule issueInstantRule) { - this.issueInstantRule = issueInstantRule; - } - - @Before - public void before() throws Exception { - - MockitoAnnotations.initMocks(this); - response = new MockHttpServletResponse(); - } - - @After - public void after() throws Exception { - - for (Iterator partitions = mapBasedStorageService.getPartitions(); partitions.hasNext();) { - - String partition = partitions.next(); - logger.debug("Removing message cache for issuer {}", partition); - - for (Iterator keys = mapBasedStorageService.getKeys(partition); keys.hasNext();) { - String key = (String) keys.next(); - logger.debug("Removing message with key of {}" , key ); - Object removed = mapBasedStorageService.remove(partition, key); - logger.debug("Message removed: {}", removed); - } - } - - - if(!securityPolicyDelegate.getPolicyRules().contains(issueInstantRule)){ - //add it back - securityPolicyDelegate.getPolicyRules().add(issueInstantRule); - } - - } - - @Test - public void testValidSignatureAuthnResponse() throws Exception { - - logger.debug("starting test."); - - securityPolicyDelegate.getPolicyRules().remove(issueInstantRule); - - - populateRequestURL(request, filterURL); - when(request.getMethod()).thenReturn("POST"); - when(request.getContextPath()).thenReturn("/sp"); - when(request.getParameter("SAMLResponse")).thenReturn(SAML_RESPONSE_POST_PARAM); - when(request.getParameter("Signature")).thenReturn(SIGNATURE_POST_PARAM); - when(request.getParameter("SigAlg")).thenReturn(SIG_ALG_POST_PARAM); - when(request.getParameter("KeyInfo")).thenReturn(KEY_INFO_POST_PARAM); - - filter.doFilter(request, response, filterChain); - - assertNotNull("response.getContentAsString was null", response.getContentAsString()); - logger.debug("The response was: {}", response.getContentAsString()); - - assertEquals("/sp/", response.getRedirectedUrl()); - } - -} -*/ \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/UserTest.java b/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/UserTest.java deleted file mode 100644 index 37df803f..00000000 --- a/maxkey-demos/maxkey-demo-saml/src/test/java/com/connsec/spring/UserTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Copyright 2010 James Cox -* -* Licensed 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. -*/ - -package com.connsec.spring; - -import static org.junit.Assert.*; - -import java.util.Collections; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; - -import com.connsec.spring.User; - -public class UserTest { - - User user; - User equivalentUser; - User notEquivalentUser; - - @Before - public void before() { - - user = new User("same", "authenticationResponseIssuingEntityName", "authenticationAssertionIssuingEntityName", "responseID","assertionID", new DateTime(), new DateTime(), new DateTime(), Collections.EMPTY_LIST); - equivalentUser = new User("same", "other", "other", "other", "other", new DateTime().minusMinutes(5), new DateTime().minusMinutes(5), new DateTime().minusMinutes(5), Collections.EMPTY_LIST); - notEquivalentUser = new User("other", "other", "other", "other", "other", new DateTime().minusMinutes(5), new DateTime().minusMinutes(5), new DateTime().minusMinutes(5), Collections.EMPTY_LIST); - - } - - - @Test - public void testEquals() throws Exception { - assertEquals(user, equivalentUser); - } - - @Test - public void testNotEquals() throws Exception { - assertFalse( user.equals(notEquivalentUser)); - - } - - @Test - public void testHashCode() throws Exception { - assertTrue(user.hashCode() == equivalentUser.hashCode()); - assertFalse(user.hashCode() == notEquivalentUser.hashCode()); - } - - -} diff --git a/maxkey-demos/maxkey-demo-tokenbase/.classpath b/maxkey-demos/maxkey-demo-tokenbase/.classpath deleted file mode 100644 index 708b1a19..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.classpath +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-tokenbase/.project b/maxkey-demos/maxkey-demo-tokenbase/.project deleted file mode 100644 index 63f7b248..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-demo-tokenbase - maxkey-demo-tokenbase - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.buildship.core.prefs b/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 65374cae..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-demos\:maxkey-demo-tokenbase diff --git a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.core.resources.prefs b/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.component b/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.component deleted file mode 100644 index ba97f1db..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-demos/maxkey-demo-tokenbase/build.gradle b/maxkey-demos/maxkey-demo-tokenbase/build.gradle deleted file mode 100644 index 0742bc43..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -description = "maxkey-demo-tokenbase" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'demo-tokenbase' - - } - - } -} \ No newline at end of file diff --git a/maxkey-demos/maxkey-demo-tokenbase/lib/commons-codec-1.9.jar b/maxkey-demos/maxkey-demo-tokenbase/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/lib/commons-logging-1.1.1.jar b/maxkey-demos/maxkey-demo-tokenbase/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/lib/gson-2.2.4.jar b/maxkey-demos/maxkey-demo-tokenbase/lib/gson-2.2.4.jar deleted file mode 100644 index 9478253e..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/lib/gson-2.2.4.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/lib/log4j-1.2.17.jar b/maxkey-demos/maxkey-demo-tokenbase/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf7..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/lib/maxkey-client-sdk.jar b/maxkey-demos/maxkey-demo-tokenbase/lib/maxkey-client-sdk.jar deleted file mode 100644 index ce5799f0..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/lib/maxkey-client-sdk.jar and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-tokenbase/src/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/classes/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/web.xml b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 16d4d820..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - index.jsp - - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/favicon.ico b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/favicon.ico deleted file mode 100644 index d0ebd0a4..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/json.png b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/json.png deleted file mode 100644 index 884d1aee..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/json.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/simple.png b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/simple.png deleted file mode 100644 index 67aeb892..00000000 Binary files a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/images/simple.png and /dev/null differ diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/index.jsp b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/index.jsp deleted file mode 100644 index 2e5583b9..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/index.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -%> - - - - - - - My JSP 'index.jsp' starting page - - - - - - - - - - This is my JSP page.
- - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/jsontoken.jsp b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/jsontoken.jsp deleted file mode 100644 index 550b291e..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/jsontoken.jsp +++ /dev/null @@ -1,114 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.tokenbase.*"%> -<%@ page language="java" import="org.maxkey.client.crypto.*"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -String token =request.getParameter("token"); -System.out.println("token : "+token); -String tokenString=TokenUtils.decode(token, "lEWhDLTo", ReciprocalUtils.Algorithm.DES); -Map tokenMap=TokenUtils.parseJsonBasedToken(tokenString); - -%> - - - - - - JsonBasedToken Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JsonBasedToken Demo
JsonBasedToken Logo
UID<%=tokenMap.get("uid") %>
UserName<%=tokenMap.get("username") %>
Department<%=tokenMap.get("department") %>
Email<%=tokenMap.get("email") %>
Authentication at Time<%=tokenMap.get("at")%>
Expires<%=tokenMap.get("expires")%>
-
- - diff --git a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/sampletoken.jsp b/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/sampletoken.jsp deleted file mode 100644 index 2aa24303..00000000 --- a/maxkey-demos/maxkey-demo-tokenbase/src/main/webapp/sampletoken.jsp +++ /dev/null @@ -1,97 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page language="java" import="org.maxkey.client.tokenbase.*"%> -<%@ page language="java" import="org.maxkey.client.crypto.*"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; - -String token =request.getParameter("token"); -System.out.println("token : "+token); -String tokenString=TokenUtils.decode(token, "x8zPbCya", ReciprocalUtils.Algorithm.DES); -String parseToken[]=TokenUtils.parseSimpleBasedToken(tokenString); -%> - - - - - - SimpleBasedToken Demo - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
SimpleBasedToken Demo
SimpleBasedToken Logo
UserName<%=parseToken[0]%>
Authentication at Time<%=parseToken[1]%>
-
- - \ No newline at end of file diff --git a/maxkey-jose-jwt/.settings/org.eclipse.jdt.core.prefs b/maxkey-jose-jwt/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/maxkey-jose-jwt/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/maxkey-lib/apache/commons-beanutils-1.9.2.jar b/maxkey-lib/apache/commons-beanutils-1.9.2.jar deleted file mode 100644 index 289461d3..00000000 Binary files a/maxkey-lib/apache/commons-beanutils-1.9.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-codec-1.10.jar b/maxkey-lib/apache/commons-codec-1.10.jar deleted file mode 100644 index 1d7417c4..00000000 Binary files a/maxkey-lib/apache/commons-codec-1.10.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-collections-3.2.1.jar b/maxkey-lib/apache/commons-collections-3.2.1.jar deleted file mode 100644 index c35fa1fe..00000000 Binary files a/maxkey-lib/apache/commons-collections-3.2.1.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-csv-1.1.jar b/maxkey-lib/apache/commons-csv-1.1.jar deleted file mode 100644 index 89bd547f..00000000 Binary files a/maxkey-lib/apache/commons-csv-1.1.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-dbcp-1.4.jar b/maxkey-lib/apache/commons-dbcp-1.4.jar deleted file mode 100644 index c4c1c4f2..00000000 Binary files a/maxkey-lib/apache/commons-dbcp-1.4.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-dbutils-1.5.jar b/maxkey-lib/apache/commons-dbutils-1.5.jar deleted file mode 100644 index b0c0e122..00000000 Binary files a/maxkey-lib/apache/commons-dbutils-1.5.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-digester-2.0.jar b/maxkey-lib/apache/commons-digester-2.0.jar deleted file mode 100644 index 9c8bd13a..00000000 Binary files a/maxkey-lib/apache/commons-digester-2.0.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-digester3-3.2.jar b/maxkey-lib/apache/commons-digester3-3.2.jar deleted file mode 100644 index 62e5140a..00000000 Binary files a/maxkey-lib/apache/commons-digester3-3.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-email-1.3.3.jar b/maxkey-lib/apache/commons-email-1.3.3.jar deleted file mode 100644 index 0061ed86..00000000 Binary files a/maxkey-lib/apache/commons-email-1.3.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-fileupload-1.2.2.jar b/maxkey-lib/apache/commons-fileupload-1.2.2.jar deleted file mode 100644 index 131f1924..00000000 Binary files a/maxkey-lib/apache/commons-fileupload-1.2.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-httpclient-3.1.jar b/maxkey-lib/apache/commons-httpclient-3.1.jar deleted file mode 100644 index 7c59774a..00000000 Binary files a/maxkey-lib/apache/commons-httpclient-3.1.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-io-2.2.jar b/maxkey-lib/apache/commons-io-2.2.jar deleted file mode 100644 index 84ca5658..00000000 Binary files a/maxkey-lib/apache/commons-io-2.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-lang-2.6.jar b/maxkey-lib/apache/commons-lang-2.6.jar deleted file mode 100644 index 98467d3a..00000000 Binary files a/maxkey-lib/apache/commons-lang-2.6.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-lang3-3.3.2.jar b/maxkey-lib/apache/commons-lang3-3.3.2.jar deleted file mode 100644 index bb069797..00000000 Binary files a/maxkey-lib/apache/commons-lang3-3.3.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-logging-1.2.jar b/maxkey-lib/apache/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f6..00000000 Binary files a/maxkey-lib/apache/commons-logging-1.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/commons-pool2-2.3.jar b/maxkey-lib/apache/commons-pool2-2.3.jar deleted file mode 100644 index 5219e1cc..00000000 Binary files a/maxkey-lib/apache/commons-pool2-2.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/fluent-hc-4.3.3.jar b/maxkey-lib/apache/fluent-hc-4.3.3.jar deleted file mode 100644 index 60976916..00000000 Binary files a/maxkey-lib/apache/fluent-hc-4.3.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/httpclient-4.3.3.jar b/maxkey-lib/apache/httpclient-4.3.3.jar deleted file mode 100644 index 6c46bffe..00000000 Binary files a/maxkey-lib/apache/httpclient-4.3.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/httpclient-cache-4.3.3.jar b/maxkey-lib/apache/httpclient-cache-4.3.3.jar deleted file mode 100644 index 082430d2..00000000 Binary files a/maxkey-lib/apache/httpclient-cache-4.3.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/httpcore-4.3.2.jar b/maxkey-lib/apache/httpcore-4.3.2.jar deleted file mode 100644 index 813ec234..00000000 Binary files a/maxkey-lib/apache/httpcore-4.3.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/httpmime-4.3.3.jar b/maxkey-lib/apache/httpmime-4.3.3.jar deleted file mode 100644 index f2b1cf7c..00000000 Binary files a/maxkey-lib/apache/httpmime-4.3.3.jar and /dev/null differ diff --git a/maxkey-lib/apache/not-yet-commons-ssl-0.3.9.jar b/maxkey-lib/apache/not-yet-commons-ssl-0.3.9.jar deleted file mode 100644 index cb1bee3a..00000000 Binary files a/maxkey-lib/apache/not-yet-commons-ssl-0.3.9.jar and /dev/null differ diff --git a/maxkey-lib/apache/velocity-1.7-dep.jar b/maxkey-lib/apache/velocity-1.7-dep.jar deleted file mode 100644 index c99aecff..00000000 Binary files a/maxkey-lib/apache/velocity-1.7-dep.jar and /dev/null differ diff --git a/maxkey-lib/apache/velocity-1.7.jar b/maxkey-lib/apache/velocity-1.7.jar deleted file mode 100644 index ae936d3d..00000000 Binary files a/maxkey-lib/apache/velocity-1.7.jar and /dev/null differ diff --git a/maxkey-lib/common/aopalliance.jar b/maxkey-lib/common/aopalliance.jar deleted file mode 100644 index 578b1a0c..00000000 Binary files a/maxkey-lib/common/aopalliance.jar and /dev/null differ diff --git a/maxkey-lib/common/asm-5.0.3.jar b/maxkey-lib/common/asm-5.0.3.jar deleted file mode 100644 index 573535b1..00000000 Binary files a/maxkey-lib/common/asm-5.0.3.jar and /dev/null differ diff --git a/maxkey-lib/common/aspectjrt-1.8.0.jar b/maxkey-lib/common/aspectjrt-1.8.0.jar deleted file mode 100644 index 776f9988..00000000 Binary files a/maxkey-lib/common/aspectjrt-1.8.0.jar and /dev/null differ diff --git a/maxkey-lib/common/aspectjtools-1.8.0.jar b/maxkey-lib/common/aspectjtools-1.8.0.jar deleted file mode 100644 index 62d168c4..00000000 Binary files a/maxkey-lib/common/aspectjtools-1.8.0.jar and /dev/null differ diff --git a/maxkey-lib/common/aspectjweaver-1.8.0.jar b/maxkey-lib/common/aspectjweaver-1.8.0.jar deleted file mode 100644 index f37d17aa..00000000 Binary files a/maxkey-lib/common/aspectjweaver-1.8.0.jar and /dev/null differ diff --git a/maxkey-lib/common/cglib-2.2.2.jar b/maxkey-lib/common/cglib-2.2.2.jar deleted file mode 100644 index 564b9f88..00000000 Binary files a/maxkey-lib/common/cglib-2.2.2.jar and /dev/null differ diff --git a/maxkey-lib/common/classmate-1.0.0.jar b/maxkey-lib/common/classmate-1.0.0.jar deleted file mode 100644 index 728746f2..00000000 Binary files a/maxkey-lib/common/classmate-1.0.0.jar and /dev/null differ diff --git a/maxkey-lib/common/ehcache-3.5.2.jar b/maxkey-lib/common/ehcache-3.5.2.jar deleted file mode 100644 index 420cd446..00000000 Binary files a/maxkey-lib/common/ehcache-3.5.2.jar and /dev/null differ diff --git a/maxkey-lib/common/guava-17.0.jar b/maxkey-lib/common/guava-17.0.jar deleted file mode 100644 index 661fc747..00000000 Binary files a/maxkey-lib/common/guava-17.0.jar and /dev/null differ diff --git a/maxkey-lib/common/kaptcha-2.3.2.jar b/maxkey-lib/common/kaptcha-2.3.2.jar deleted file mode 100644 index 36529970..00000000 Binary files a/maxkey-lib/common/kaptcha-2.3.2.jar and /dev/null differ diff --git a/maxkey-lib/common/ognl-2.6.9.jar b/maxkey-lib/common/ognl-2.6.9.jar deleted file mode 100644 index 0f1c0fb5..00000000 Binary files a/maxkey-lib/common/ognl-2.6.9.jar and /dev/null differ diff --git a/maxkey-lib/common/org.aspectj.matcher.jar b/maxkey-lib/common/org.aspectj.matcher.jar deleted file mode 100644 index 3dc22ebc..00000000 Binary files a/maxkey-lib/common/org.aspectj.matcher.jar and /dev/null differ diff --git a/maxkey-lib/common/zxing.core-2.2.jar b/maxkey-lib/common/zxing.core-2.2.jar deleted file mode 100644 index 9e95ab22..00000000 Binary files a/maxkey-lib/common/zxing.core-2.2.jar and /dev/null differ diff --git a/maxkey-lib/db/c3p0-0.9.5.4.jar b/maxkey-lib/db/c3p0-0.9.5.4.jar deleted file mode 100644 index a71b4688..00000000 Binary files a/maxkey-lib/db/c3p0-0.9.5.4.jar and /dev/null differ diff --git a/maxkey-lib/db/hibernate-core-4.3.5.Final.jar b/maxkey-lib/db/hibernate-core-4.3.5.Final.jar deleted file mode 100644 index 4c6df02c..00000000 Binary files a/maxkey-lib/db/hibernate-core-4.3.5.Final.jar and /dev/null differ diff --git a/maxkey-lib/db/hibernate-jpa-2.1-api-1.0.0.Final.jar b/maxkey-lib/db/hibernate-jpa-2.1-api-1.0.0.Final.jar deleted file mode 100644 index e2f2c592..00000000 Binary files a/maxkey-lib/db/hibernate-jpa-2.1-api-1.0.0.Final.jar and /dev/null differ diff --git a/maxkey-lib/db/hibernate-validator-5.1.1.Final.jar b/maxkey-lib/db/hibernate-validator-5.1.1.Final.jar deleted file mode 100644 index fa826b2a..00000000 Binary files a/maxkey-lib/db/hibernate-validator-5.1.1.Final.jar and /dev/null differ diff --git a/maxkey-lib/db/hibernate-validator-annotation-processor-5.1.1.Final.jar b/maxkey-lib/db/hibernate-validator-annotation-processor-5.1.1.Final.jar deleted file mode 100644 index b61e3049..00000000 Binary files a/maxkey-lib/db/hibernate-validator-annotation-processor-5.1.1.Final.jar and /dev/null differ diff --git a/maxkey-lib/db/hibernate-validator-cdi-5.1.1.Final.jar b/maxkey-lib/db/hibernate-validator-cdi-5.1.1.Final.jar deleted file mode 100644 index b3c78255..00000000 Binary files a/maxkey-lib/db/hibernate-validator-cdi-5.1.1.Final.jar and /dev/null differ diff --git a/maxkey-lib/db/mchange-commons-java-0.2.15.jar b/maxkey-lib/db/mchange-commons-java-0.2.15.jar deleted file mode 100644 index 4954089c..00000000 Binary files a/maxkey-lib/db/mchange-commons-java-0.2.15.jar and /dev/null differ diff --git a/maxkey-lib/db/mybatis-3.4.6.jar b/maxkey-lib/db/mybatis-3.4.6.jar deleted file mode 100644 index ae6aae8d..00000000 Binary files a/maxkey-lib/db/mybatis-3.4.6.jar and /dev/null differ diff --git a/maxkey-lib/db/mybatis-spring-1.3.2.jar b/maxkey-lib/db/mybatis-spring-1.3.2.jar deleted file mode 100644 index a69335fc..00000000 Binary files a/maxkey-lib/db/mybatis-spring-1.3.2.jar and /dev/null differ diff --git a/maxkey-lib/db/mysql-connector-java-5.1.18-bin.jar b/maxkey-lib/db/mysql-connector-java-5.1.18-bin.jar deleted file mode 100644 index cdee6a16..00000000 Binary files a/maxkey-lib/db/mysql-connector-java-5.1.18-bin.jar and /dev/null differ diff --git a/maxkey-lib/java/activation-1.1.jar b/maxkey-lib/java/activation-1.1.jar deleted file mode 100644 index 53f82a1c..00000000 Binary files a/maxkey-lib/java/activation-1.1.jar and /dev/null differ diff --git a/maxkey-lib/java/bcpkix-jdk15on-150.jar b/maxkey-lib/java/bcpkix-jdk15on-150.jar deleted file mode 100644 index 5dc125fc..00000000 Binary files a/maxkey-lib/java/bcpkix-jdk15on-150.jar and /dev/null differ diff --git a/maxkey-lib/java/bcprov-ext-jdk15on-150.jar b/maxkey-lib/java/bcprov-ext-jdk15on-150.jar deleted file mode 100644 index 6fd2db42..00000000 Binary files a/maxkey-lib/java/bcprov-ext-jdk15on-150.jar and /dev/null differ diff --git a/maxkey-lib/java/bcprov-jdk15on-150.jar b/maxkey-lib/java/bcprov-jdk15on-150.jar deleted file mode 100644 index d4b510d7..00000000 Binary files a/maxkey-lib/java/bcprov-jdk15on-150.jar and /dev/null differ diff --git a/maxkey-lib/java/javassist-3.17.1-GA.jar b/maxkey-lib/java/javassist-3.17.1-GA.jar deleted file mode 100644 index a2489807..00000000 Binary files a/maxkey-lib/java/javassist-3.17.1-GA.jar and /dev/null differ diff --git a/maxkey-lib/java/javax.mail.1.5.0.jar b/maxkey-lib/java/javax.mail.1.5.0.jar deleted file mode 100644 index f27414b9..00000000 Binary files a/maxkey-lib/java/javax.mail.1.5.0.jar and /dev/null differ diff --git a/maxkey-lib/java/jstl-1.2.jar b/maxkey-lib/java/jstl-1.2.jar deleted file mode 100644 index 0fd275e9..00000000 Binary files a/maxkey-lib/java/jstl-1.2.jar and /dev/null differ diff --git a/maxkey-lib/java/jta.jar b/maxkey-lib/java/jta.jar deleted file mode 100644 index e0822a96..00000000 Binary files a/maxkey-lib/java/jta.jar and /dev/null differ diff --git a/maxkey-lib/java/standard.jar b/maxkey-lib/java/standard.jar deleted file mode 100644 index bc528acb..00000000 Binary files a/maxkey-lib/java/standard.jar and /dev/null differ diff --git a/maxkey-lib/java/transaction-api-1.1.jar b/maxkey-lib/java/transaction-api-1.1.jar deleted file mode 100644 index 7736ec9f..00000000 Binary files a/maxkey-lib/java/transaction-api-1.1.jar and /dev/null differ diff --git a/maxkey-lib/java/validation-api-1.1.0.Final.jar b/maxkey-lib/java/validation-api-1.1.0.Final.jar deleted file mode 100644 index de854038..00000000 Binary files a/maxkey-lib/java/validation-api-1.1.0.Final.jar and /dev/null differ diff --git a/maxkey-lib/json/gson-2.2.4.jar b/maxkey-lib/json/gson-2.2.4.jar deleted file mode 100644 index 9478253e..00000000 Binary files a/maxkey-lib/json/gson-2.2.4.jar and /dev/null differ diff --git a/maxkey-lib/json/jackson-all-1.9.11.jar b/maxkey-lib/json/jackson-all-1.9.11.jar deleted file mode 100644 index 4ad30952..00000000 Binary files a/maxkey-lib/json/jackson-all-1.9.11.jar and /dev/null differ diff --git a/maxkey-lib/json/jackson-annotations-2.9.8.jar b/maxkey-lib/json/jackson-annotations-2.9.8.jar deleted file mode 100644 index 4d9f4215..00000000 Binary files a/maxkey-lib/json/jackson-annotations-2.9.8.jar and /dev/null differ diff --git a/maxkey-lib/json/jackson-core-2.9.8.jar b/maxkey-lib/json/jackson-core-2.9.8.jar deleted file mode 100644 index 362f1f39..00000000 Binary files a/maxkey-lib/json/jackson-core-2.9.8.jar and /dev/null differ diff --git a/maxkey-lib/json/jackson-databind-2.9.8.jar b/maxkey-lib/json/jackson-databind-2.9.8.jar deleted file mode 100644 index 2d8687b5..00000000 Binary files a/maxkey-lib/json/jackson-databind-2.9.8.jar and /dev/null differ diff --git a/maxkey-lib/log/jboss-logging-3.1.1.GA.jar b/maxkey-lib/log/jboss-logging-3.1.1.GA.jar deleted file mode 100644 index 891989aa..00000000 Binary files a/maxkey-lib/log/jboss-logging-3.1.1.GA.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-1.2-api-2.9.0.jar b/maxkey-lib/log/log4j-1.2-api-2.9.0.jar deleted file mode 100644 index 64d48661..00000000 Binary files a/maxkey-lib/log/log4j-1.2-api-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-api-2.9.0.jar b/maxkey-lib/log/log4j-api-2.9.0.jar deleted file mode 100644 index 04f44398..00000000 Binary files a/maxkey-lib/log/log4j-api-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-core-2.9.0.jar b/maxkey-lib/log/log4j-core-2.9.0.jar deleted file mode 100644 index 7a94c74d..00000000 Binary files a/maxkey-lib/log/log4j-core-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-jcl-2.9.0.jar b/maxkey-lib/log/log4j-jcl-2.9.0.jar deleted file mode 100644 index 271181ef..00000000 Binary files a/maxkey-lib/log/log4j-jcl-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-jul-2.9.0.jar b/maxkey-lib/log/log4j-jul-2.9.0.jar deleted file mode 100644 index 3096b11e..00000000 Binary files a/maxkey-lib/log/log4j-jul-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-slf4j-impl-2.9.0.jar b/maxkey-lib/log/log4j-slf4j-impl-2.9.0.jar deleted file mode 100644 index 6249f6e0..00000000 Binary files a/maxkey-lib/log/log4j-slf4j-impl-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/log4j-web-2.9.0.jar b/maxkey-lib/log/log4j-web-2.9.0.jar deleted file mode 100644 index 939d7649..00000000 Binary files a/maxkey-lib/log/log4j-web-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/log/slf4j-api-1.7.25.jar b/maxkey-lib/log/slf4j-api-1.7.25.jar deleted file mode 100644 index 7e62f133..00000000 Binary files a/maxkey-lib/log/slf4j-api-1.7.25.jar and /dev/null differ diff --git a/maxkey-lib/opensaml/opensaml-2.6.5.jar b/maxkey-lib/opensaml/opensaml-2.6.5.jar deleted file mode 100644 index eba31eee..00000000 Binary files a/maxkey-lib/opensaml/opensaml-2.6.5.jar and /dev/null differ diff --git a/maxkey-lib/opensaml/openws-1.5.5.jar b/maxkey-lib/opensaml/openws-1.5.5.jar deleted file mode 100644 index 3140bb46..00000000 Binary files a/maxkey-lib/opensaml/openws-1.5.5.jar and /dev/null differ diff --git a/maxkey-lib/opensaml/xmltooling-1.4.5.jar b/maxkey-lib/opensaml/xmltooling-1.4.5.jar deleted file mode 100644 index 1beddba8..00000000 Binary files a/maxkey-lib/opensaml/xmltooling-1.4.5.jar and /dev/null differ diff --git a/maxkey-lib/other/cas-client-core-3.4.1.jar b/maxkey-lib/other/cas-client-core-3.4.1.jar deleted file mode 100644 index 45d4465d..00000000 Binary files a/maxkey-lib/other/cas-client-core-3.4.1.jar and /dev/null differ diff --git a/maxkey-lib/other/esapi-2.0.1.jar b/maxkey-lib/other/esapi-2.0.1.jar deleted file mode 100644 index 06b91499..00000000 Binary files a/maxkey-lib/other/esapi-2.0.1.jar and /dev/null differ diff --git a/maxkey-lib/other/jdom-1.0.jar b/maxkey-lib/other/jdom-1.0.jar deleted file mode 100644 index 288e64cb..00000000 Binary files a/maxkey-lib/other/jdom-1.0.jar and /dev/null differ diff --git a/maxkey-lib/other/jedis-2.9.0.jar b/maxkey-lib/other/jedis-2.9.0.jar deleted file mode 100644 index f4d27d37..00000000 Binary files a/maxkey-lib/other/jedis-2.9.0.jar and /dev/null differ diff --git a/maxkey-lib/other/joda-time-2.2.jar b/maxkey-lib/other/joda-time-2.2.jar deleted file mode 100644 index 69fa9240..00000000 Binary files a/maxkey-lib/other/joda-time-2.2.jar and /dev/null differ diff --git a/maxkey-lib/other/jradius-core-1.1.4.jar b/maxkey-lib/other/jradius-core-1.1.4.jar deleted file mode 100644 index b4cf3e39..00000000 Binary files a/maxkey-lib/other/jradius-core-1.1.4.jar and /dev/null differ diff --git a/maxkey-lib/other/jradius-dictionary-1.1.4.jar b/maxkey-lib/other/jradius-dictionary-1.1.4.jar deleted file mode 100644 index f8f5829b..00000000 Binary files a/maxkey-lib/other/jradius-dictionary-1.1.4.jar and /dev/null differ diff --git a/maxkey-lib/other/mockito-all-1.9.0.jar b/maxkey-lib/other/mockito-all-1.9.0.jar deleted file mode 100644 index 273fd50f..00000000 Binary files a/maxkey-lib/other/mockito-all-1.9.0.jar and /dev/null differ diff --git a/maxkey-lib/db/mybatis-jpa-extra-1.0.jar b/maxkey-lib/other/mybatis-jpa-extra-1.0.jar similarity index 100% rename from maxkey-lib/db/mybatis-jpa-extra-1.0.jar rename to maxkey-lib/other/mybatis-jpa-extra-1.0.jar diff --git a/maxkey-lib/db/mybatis-jpa-extra-2.1-api-1.0.jar b/maxkey-lib/other/mybatis-jpa-extra-2.1-api-1.0.jar similarity index 100% rename from maxkey-lib/db/mybatis-jpa-extra-2.1-api-1.0.jar rename to maxkey-lib/other/mybatis-jpa-extra-2.1-api-1.0.jar diff --git a/maxkey-lib/other/nekohtml-1.9.14.jar b/maxkey-lib/other/nekohtml-1.9.14.jar deleted file mode 100644 index ba65542c..00000000 Binary files a/maxkey-lib/other/nekohtml-1.9.14.jar and /dev/null differ diff --git a/maxkey-lib/other/pinyin4j-2.5.0.jar b/maxkey-lib/other/pinyin4j-2.5.0.jar deleted file mode 100644 index e8ede137..00000000 Binary files a/maxkey-lib/other/pinyin4j-2.5.0.jar and /dev/null differ diff --git a/maxkey-lib/other/quartz-2.2.1.jar b/maxkey-lib/other/quartz-2.2.1.jar deleted file mode 100644 index 563e9975..00000000 Binary files a/maxkey-lib/other/quartz-2.2.1.jar and /dev/null differ diff --git a/maxkey-lib/other/reactive-streams-1.0.2.jar b/maxkey-lib/other/reactive-streams-1.0.2.jar deleted file mode 100644 index 8e8a9ce0..00000000 Binary files a/maxkey-lib/other/reactive-streams-1.0.2.jar and /dev/null differ diff --git a/maxkey-lib/other/reactor-core-3.2.8.RELEASE.jar b/maxkey-lib/other/reactor-core-3.2.8.RELEASE.jar deleted file mode 100644 index dfe983f1..00000000 Binary files a/maxkey-lib/other/reactor-core-3.2.8.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/other/snakeyaml-1.12.jar b/maxkey-lib/other/snakeyaml-1.12.jar deleted file mode 100644 index fd314d3d..00000000 Binary files a/maxkey-lib/other/snakeyaml-1.12.jar and /dev/null differ diff --git a/maxkey-lib/other/szxcvbn_2.9.2-0.2.jar b/maxkey-lib/other/szxcvbn_2.9.2-0.2.jar deleted file mode 100644 index 8f3b8b05..00000000 Binary files a/maxkey-lib/other/szxcvbn_2.9.2-0.2.jar and /dev/null differ diff --git a/maxkey-lib/other/tink-1.2.2.jar b/maxkey-lib/other/tink-1.2.2.jar deleted file mode 100644 index d2a82bc8..00000000 Binary files a/maxkey-lib/other/tink-1.2.2.jar and /dev/null differ diff --git a/maxkey-lib/apache/tsik-1.0.0.jar b/maxkey-lib/other/tsik-1.0.0.jar similarity index 100% rename from maxkey-lib/apache/tsik-1.0.0.jar rename to maxkey-lib/other/tsik-1.0.0.jar diff --git a/maxkey-lib/other/vt-crypt-2.1.4.jar b/maxkey-lib/other/vt-crypt-2.1.4.jar deleted file mode 100644 index 16223bde..00000000 Binary files a/maxkey-lib/other/vt-crypt-2.1.4.jar and /dev/null differ diff --git a/maxkey-lib/other/vt-dictionary-3.0.jar b/maxkey-lib/other/vt-dictionary-3.0.jar deleted file mode 100644 index ac48e132..00000000 Binary files a/maxkey-lib/other/vt-dictionary-3.0.jar and /dev/null differ diff --git a/maxkey-lib/other/vt-password-3.1.2.jar b/maxkey-lib/other/vt-password-3.1.2.jar deleted file mode 100644 index 9201ff0b..00000000 Binary files a/maxkey-lib/other/vt-password-3.1.2.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-aop-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-aop-5.1.6.RELEASE.jar deleted file mode 100644 index 35f580e5..00000000 Binary files a/maxkey-lib/spring/spring-aop-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-aspects-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-aspects-5.1.6.RELEASE.jar deleted file mode 100644 index 18c44167..00000000 Binary files a/maxkey-lib/spring/spring-aspects-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-beans-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-beans-5.1.6.RELEASE.jar deleted file mode 100644 index 39813b26..00000000 Binary files a/maxkey-lib/spring/spring-beans-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-context-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-context-5.1.6.RELEASE.jar deleted file mode 100644 index 51658200..00000000 Binary files a/maxkey-lib/spring/spring-context-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-context-indexer-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-context-indexer-5.1.6.RELEASE.jar deleted file mode 100644 index 3802b92b..00000000 Binary files a/maxkey-lib/spring/spring-context-indexer-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-context-support-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-context-support-5.1.6.RELEASE.jar deleted file mode 100644 index 33412b57..00000000 Binary files a/maxkey-lib/spring/spring-context-support-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-core-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-core-5.1.6.RELEASE.jar deleted file mode 100644 index 5522cf3e..00000000 Binary files a/maxkey-lib/spring/spring-core-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-expression-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-expression-5.1.6.RELEASE.jar deleted file mode 100644 index cdc79564..00000000 Binary files a/maxkey-lib/spring/spring-expression-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-instrument-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-instrument-5.1.6.RELEASE.jar deleted file mode 100644 index a6ba222b..00000000 Binary files a/maxkey-lib/spring/spring-instrument-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-jcl-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-jcl-5.1.6.RELEASE.jar deleted file mode 100644 index a9e71fbf..00000000 Binary files a/maxkey-lib/spring/spring-jcl-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-jdbc-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-jdbc-5.1.6.RELEASE.jar deleted file mode 100644 index e8c866f3..00000000 Binary files a/maxkey-lib/spring/spring-jdbc-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-jms-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-jms-5.1.6.RELEASE.jar deleted file mode 100644 index d175e4f3..00000000 Binary files a/maxkey-lib/spring/spring-jms-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-messaging-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-messaging-5.1.6.RELEASE.jar deleted file mode 100644 index 1a970a9f..00000000 Binary files a/maxkey-lib/spring/spring-messaging-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-orm-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-orm-5.1.6.RELEASE.jar deleted file mode 100644 index 06ec0203..00000000 Binary files a/maxkey-lib/spring/spring-orm-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-oxm-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-oxm-5.1.6.RELEASE.jar deleted file mode 100644 index f4abb1e5..00000000 Binary files a/maxkey-lib/spring/spring-oxm-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-security-core-5.1.5.RELEASE.jar b/maxkey-lib/spring/spring-security-core-5.1.5.RELEASE.jar deleted file mode 100644 index 372d16fc..00000000 Binary files a/maxkey-lib/spring/spring-security-core-5.1.5.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-security-crypto-5.1.5.RELEASE.jar b/maxkey-lib/spring/spring-security-crypto-5.1.5.RELEASE.jar deleted file mode 100644 index 8555f582..00000000 Binary files a/maxkey-lib/spring/spring-security-crypto-5.1.5.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-security-web-5.1.5.RELEASE.jar b/maxkey-lib/spring/spring-security-web-5.1.5.RELEASE.jar deleted file mode 100644 index 201541f7..00000000 Binary files a/maxkey-lib/spring/spring-security-web-5.1.5.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-test-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-test-5.1.6.RELEASE.jar deleted file mode 100644 index 3c30c0d6..00000000 Binary files a/maxkey-lib/spring/spring-test-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-tx-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-tx-5.1.6.RELEASE.jar deleted file mode 100644 index 9533d7d6..00000000 Binary files a/maxkey-lib/spring/spring-tx-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-web-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-web-5.1.6.RELEASE.jar deleted file mode 100644 index 1e346d9d..00000000 Binary files a/maxkey-lib/spring/spring-web-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-webflux-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-webflux-5.1.6.RELEASE.jar deleted file mode 100644 index 728d375d..00000000 Binary files a/maxkey-lib/spring/spring-webflux-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-webmvc-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-webmvc-5.1.6.RELEASE.jar deleted file mode 100644 index c6bec3a6..00000000 Binary files a/maxkey-lib/spring/spring-webmvc-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/spring/spring-websocket-5.1.6.RELEASE.jar b/maxkey-lib/spring/spring-websocket-5.1.6.RELEASE.jar deleted file mode 100644 index 3fb93ada..00000000 Binary files a/maxkey-lib/spring/spring-websocket-5.1.6.RELEASE.jar and /dev/null differ diff --git a/maxkey-lib/xml/dom4j-1.6.1.jar b/maxkey-lib/xml/dom4j-1.6.1.jar deleted file mode 100644 index c8c4dbb9..00000000 Binary files a/maxkey-lib/xml/dom4j-1.6.1.jar and /dev/null differ diff --git a/maxkey-lib/xml/jaxb-api-2.1.jar b/maxkey-lib/xml/jaxb-api-2.1.jar deleted file mode 100644 index be3d6dca..00000000 Binary files a/maxkey-lib/xml/jaxb-api-2.1.jar and /dev/null differ diff --git a/maxkey-lib/xml/jaxb-impl-2.2_1.jar b/maxkey-lib/xml/jaxb-impl-2.2_1.jar deleted file mode 100644 index 7b0bff60..00000000 Binary files a/maxkey-lib/xml/jaxb-impl-2.2_1.jar and /dev/null differ diff --git a/maxkey-lib/xml/jsr173_1.0_api.jar b/maxkey-lib/xml/jsr173_1.0_api.jar deleted file mode 100644 index d25ae1ac..00000000 Binary files a/maxkey-lib/xml/jsr173_1.0_api.jar and /dev/null differ diff --git a/maxkey-lib/xml/serializer-2.10.0.jar b/maxkey-lib/xml/serializer-2.10.0.jar deleted file mode 100644 index de9b007b..00000000 Binary files a/maxkey-lib/xml/serializer-2.10.0.jar and /dev/null differ diff --git a/maxkey-lib/xml/xalan-2.7.1.jar b/maxkey-lib/xml/xalan-2.7.1.jar deleted file mode 100644 index 458fa73d..00000000 Binary files a/maxkey-lib/xml/xalan-2.7.1.jar and /dev/null differ diff --git a/maxkey-lib/xml/xercesImpl-2.10.0.jar b/maxkey-lib/xml/xercesImpl-2.10.0.jar deleted file mode 100644 index 9dcd8c38..00000000 Binary files a/maxkey-lib/xml/xercesImpl-2.10.0.jar and /dev/null differ diff --git a/maxkey-lib/xml/xml-apis-2.10.0.jar b/maxkey-lib/xml/xml-apis-2.10.0.jar deleted file mode 100644 index 46733464..00000000 Binary files a/maxkey-lib/xml/xml-apis-2.10.0.jar and /dev/null differ diff --git a/maxkey-lib/xml/xml-resolver-1.2.jar b/maxkey-lib/xml/xml-resolver-1.2.jar deleted file mode 100644 index e535bdc0..00000000 Binary files a/maxkey-lib/xml/xml-resolver-1.2.jar and /dev/null differ diff --git a/maxkey-lib/xml/xmlsec-1.5.6.jar b/maxkey-lib/xml/xmlsec-1.5.6.jar deleted file mode 100644 index be0af84e..00000000 Binary files a/maxkey-lib/xml/xmlsec-1.5.6.jar and /dev/null differ diff --git a/maxkey-lib/xml/xmlunit-1.3.jar b/maxkey-lib/xml/xmlunit-1.3.jar deleted file mode 100644 index b5965f78..00000000 Binary files a/maxkey-lib/xml/xmlunit-1.3.jar and /dev/null differ diff --git a/maxkey-lib/xml/xpp3_min-1.1.4c.jar b/maxkey-lib/xml/xpp3_min-1.1.4c.jar deleted file mode 100644 index 813a9a83..00000000 Binary files a/maxkey-lib/xml/xpp3_min-1.1.4c.jar and /dev/null differ diff --git a/maxkey-lib/xml/xstream-1.3.jar b/maxkey-lib/xml/xstream-1.3.jar deleted file mode 100644 index e5a3234a..00000000 Binary files a/maxkey-lib/xml/xstream-1.3.jar and /dev/null differ diff --git a/maxkey-protocols/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/maxkey-protocols/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-authorize/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore b/maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore new file mode 100644 index 00000000..cf1db2ee --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore @@ -0,0 +1 @@ +/org/ diff --git a/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-cas/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore b/maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore new file mode 100644 index 00000000..cf1db2ee --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore @@ -0,0 +1 @@ +/org/ diff --git a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/AbstractTicket.java b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/AbstractTicket.java index 84851dd5..cf6fdf2e 100644 --- a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/AbstractTicket.java +++ b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/AbstractTicket.java @@ -7,8 +7,6 @@ import org.springframework.util.Assert; import javax.persistence.Column; import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.MappedSuperclass; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -28,7 +26,6 @@ import java.time.ZonedDateTime; * @author Scott Battaglia * @since 3.0.0 */ -@MappedSuperclass public abstract class AbstractTicket implements Ticket { private static final long serialVersionUID = -8506442397878267555L; diff --git a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/ServiceTicketImpl.java b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/ServiceTicketImpl.java index 4ff0005f..de5f7eab 100644 --- a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/ServiceTicketImpl.java +++ b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/ticket/ServiceTicketImpl.java @@ -5,7 +5,6 @@ import org.maxkey.domain.apps.CasDetails; import org.springframework.security.core.Authentication; import javax.persistence.Column; -import javax.persistence.Lob; /** * Domain object representing a Service Ticket. A service ticket grants specific @@ -25,7 +24,7 @@ public class ServiceTicketImpl extends AbstractTicket { /** * The service this ticket is valid for. */ - @Lob + @Column(name = "SERVICE", nullable = false, length = Integer.MAX_VALUE) private Service service; diff --git a/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-desktop/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-extendapi/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-formbased/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-ltpa/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/bin/main/.gitignore b/maxkey-protocols/maxkey-protocol-oauth-2.0/bin/main/.gitignore new file mode 100644 index 00000000..cf1db2ee --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/bin/main/.gitignore @@ -0,0 +1 @@ +/org/ diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/DefaultOAuth2RefreshToken.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/DefaultOAuth2RefreshToken.java index 75ab400a..91a8e209 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/DefaultOAuth2RefreshToken.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/DefaultOAuth2RefreshToken.java @@ -2,8 +2,9 @@ package org.maxkey.authz.oauth2.common; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonCreator; -import org.codehaus.jackson.annotate.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + /** * An OAuth 2 refresh token. diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessToken.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessToken.java index b207e03c..9069b12c 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessToken.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessToken.java @@ -21,8 +21,6 @@ import java.util.Set; * @author Dave Syer * */ -@org.codehaus.jackson.map.annotate.JsonSerialize(using = OAuth2AccessTokenJackson1Serializer.class) -@org.codehaus.jackson.map.annotate.JsonDeserialize(using = OAuth2AccessTokenJackson1Deserializer.class) @com.fasterxml.jackson.databind.annotation.JsonSerialize(using = OAuth2AccessTokenJackson2Serializer.class) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = OAuth2AccessTokenJackson2Deserializer.class) diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Deserializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Deserializer.java deleted file mode 100644 index 236c25b9..00000000 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Deserializer.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2006-2010 the original author or authors. - * - * Licensed 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. - */ -package org.maxkey.authz.oauth2.common; - -import java.io.IOException; -import java.util.Date; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Set; - -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.JsonToken; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.deser.StdDeserializer; -import org.maxkey.authz.oauth2.common.util.OAuth2Utils; - -/** - *

- * Provides the ability to deserialize JSON response into an {@link OAuth2AccessToken} with jackson by implementing - * {@link JsonDeserializer}. - *

- *

- * The expected format of the access token is defined by Successful Response. - *

- * - * @author Rob Winch - * @see OAuth2AccessTokenJackson1Serializer - */ -@SuppressWarnings("deprecation") -public final class OAuth2AccessTokenJackson1Deserializer extends StdDeserializer { - - public OAuth2AccessTokenJackson1Deserializer() { - super(OAuth2AccessToken.class); - } - - @Override - public OAuth2AccessToken deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, - JsonProcessingException { - - String tokenValue = null; - String tokenType = null; - String refreshToken = null; - Long expiresIn = null; - Set scope = null; - Map additionalInformation = new LinkedHashMap(); - - // TODO What should occur if a parameter exists twice - while (jp.nextToken() != JsonToken.END_OBJECT) { - String name = jp.getCurrentName(); - jp.nextToken(); - if (OAuth2AccessToken.ACCESS_TOKEN.equals(name)) { - tokenValue = jp.getText(); - } - else if (OAuth2AccessToken.TOKEN_TYPE.equals(name)) { - tokenType = jp.getText(); - } - else if (OAuth2AccessToken.REFRESH_TOKEN.equals(name)) { - refreshToken = jp.getText(); - } - else if (OAuth2AccessToken.EXPIRES_IN.equals(name)) { - try { - expiresIn = jp.getLongValue(); - } catch (JsonParseException e) { - expiresIn = Long.valueOf(jp.getText()); - } - } - else if (OAuth2AccessToken.SCOPE.equals(name)) { - String text = jp.getText(); - scope = OAuth2Utils.parseParameterList(text); - } else { - additionalInformation.put(name, jp.readValueAs(Object.class)); - } - } - - // TODO What should occur if a required parameter (tokenValue or tokenType) is missing? - - DefaultOAuth2AccessToken accessToken = new DefaultOAuth2AccessToken(tokenValue); - accessToken.setTokenType(tokenType); - if (expiresIn != null) { - accessToken.setExpiration(new Date(System.currentTimeMillis() + (expiresIn * 1000))); - } - if (refreshToken != null) { - accessToken.setRefreshToken(new DefaultOAuth2RefreshToken(refreshToken)); - } - accessToken.setScope(scope); - accessToken.setAdditionalInformation(additionalInformation); - - return accessToken; - } -} \ No newline at end of file diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Serializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Serializer.java deleted file mode 100644 index 6b80aafa..00000000 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2AccessTokenJackson1Serializer.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2006-2010 the original author or authors. - * - * Licensed 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. - */ -package org.maxkey.authz.oauth2.common; - -import java.io.IOException; -import java.util.Date; -import java.util.Map; -import java.util.Set; - -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; -import org.codehaus.jackson.map.ser.SerializerBase; -import org.springframework.util.Assert; - -/** - * Provides the ability to serialize an {@link OAuth2AccessToken} with jackson by implementing {@link JsonSerializer}. - * Refer to {@link OAuth2AccessTokenJackson1Deserializer} to learn more about the JSON format that is used. - * - * @author Rob Winch - * @see OAuth2AccessTokenJackson1Deserializer - */ -@SuppressWarnings("deprecation") -public final class OAuth2AccessTokenJackson1Serializer extends SerializerBase { - - public OAuth2AccessTokenJackson1Serializer() { - super(OAuth2AccessToken.class); - } - - @Override - public void serialize(OAuth2AccessToken token, JsonGenerator jgen, SerializerProvider provider) throws IOException, - JsonGenerationException { - jgen.writeStartObject(); - jgen.writeStringField(OAuth2AccessToken.ACCESS_TOKEN, token.getValue()); - jgen.writeStringField(OAuth2AccessToken.TOKEN_TYPE, token.getTokenType()); - OAuth2RefreshToken refreshToken = token.getRefreshToken(); - if (refreshToken != null) { - jgen.writeStringField(OAuth2AccessToken.REFRESH_TOKEN, refreshToken.getValue()); - } - Date expiration = token.getExpiration(); - if (expiration != null) { - long now = System.currentTimeMillis(); - jgen.writeNumberField(OAuth2AccessToken.EXPIRES_IN, (expiration.getTime() - now) / 1000); - } - Set scope = token.getScope(); - if (scope != null && !scope.isEmpty()) { - StringBuffer scopes = new StringBuffer(); - for (String s : scope) { - Assert.hasLength(s, "Scopes cannot be null or empty. Got " + scope + ""); - scopes.append(s); - scopes.append(" "); - } - jgen.writeStringField(OAuth2AccessToken.SCOPE, scopes.substring(0, scopes.length() - 1)); - } - Map additionalInformation = token.getAdditionalInformation(); - for (String key : additionalInformation.keySet()) { - jgen.writeObjectField(key, additionalInformation.get(key)); - } - jgen.writeEndObject(); - } -} \ No newline at end of file diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2RefreshToken.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2RefreshToken.java index 9ae0fc13..102a7907 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2RefreshToken.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/OAuth2RefreshToken.java @@ -14,7 +14,8 @@ package org.maxkey.authz.oauth2.common; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonValue; +import com.fasterxml.jackson.annotation.JsonValue; + /** * @author Dave Syer diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2Exception.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2Exception.java index 91d8acec..246dbbe7 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2Exception.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2Exception.java @@ -12,8 +12,6 @@ import java.util.TreeMap; * @author Dave Syer */ @SuppressWarnings("serial") -@org.codehaus.jackson.map.annotate.JsonSerialize(using = OAuth2ExceptionJackson1Serializer.class) -@org.codehaus.jackson.map.annotate.JsonDeserialize(using = OAuth2ExceptionJackson1Deserializer.class) @com.fasterxml.jackson.databind.annotation.JsonSerialize(using = OAuth2ExceptionJackson2Serializer.class) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = OAuth2ExceptionJackson2Deserializer.class) public class OAuth2Exception extends RuntimeException { diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Deserializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Deserializer.java index 3abb8f3e..bb55bc43 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Deserializer.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Deserializer.java @@ -18,13 +18,14 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.JsonToken; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; import org.maxkey.authz.oauth2.common.util.OAuth2Utils; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + /** * @author Dave Syer * diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Serializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Serializer.java index 9bef3754..d52481b9 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Serializer.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/exceptions/OAuth2ExceptionJackson1Serializer.java @@ -15,10 +15,10 @@ package org.maxkey.authz.oauth2.common.exceptions; import java.io.IOException; import java.util.Map.Entry; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; /** * @author Dave Syer diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JacksonJsonParser.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JacksonJsonParser.java deleted file mode 100644 index 9185e992..00000000 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JacksonJsonParser.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2013-2014 the original author or authors. - * - * Licensed 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. - */ - -package org.maxkey.authz.oauth2.common.util; - -import java.util.Map; - -import org.codehaus.jackson.map.ObjectMapper; - -/** - * @author Dave Syer - * - */ -public class JacksonJsonParser implements JsonParser { - - private ObjectMapper mapper = new ObjectMapper(); - - @SuppressWarnings("unchecked") - @Override - public Map parseMap(String json) { - try { - return mapper.readValue(json, Map.class); - } - catch (Exception e) { - throw new IllegalArgumentException("Cannot parse json", e); - } - } - - @Override - public String formatMap(Map map) { - try { - return mapper.writeValueAsString(map); - } - catch (Exception e) { - throw new IllegalArgumentException("Cannot format json", e); - } - } - -} \ No newline at end of file diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateDeserializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateDeserializer.java index f7bd0afc..b64cddcc 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateDeserializer.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateDeserializer.java @@ -12,17 +12,17 @@ */ package org.maxkey.authz.oauth2.common.util; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + /** * JSON deserializer for Jackson to handle regular date instances as timestamps in ISO format. * @@ -32,16 +32,18 @@ import java.util.Date; public class JsonDateDeserializer extends JsonDeserializer { private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); - + + @Override - public Date deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { + public Date deserialize(com.fasterxml.jackson.core.JsonParser parser, DeserializationContext ctxt) + throws IOException, JsonProcessingException { try { synchronized (dateFormat) { - return dateFormat.parse(parser.getText()); + return dateFormat.parse(parser.toString()); } } catch (ParseException e) { - throw new JsonParseException("Could not parse date", parser.getCurrentLocation(), e); + throw new JsonParseException( parser,"Could not parse date ",e); } } diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateSerializer.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateSerializer.java index f882bc45..da9ddfbc 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateSerializer.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonDateSerializer.java @@ -12,15 +12,16 @@ */ package org.maxkey.authz.oauth2.common.util; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + /** * JSON serializer for Jackson to handle regular date instances as timestamps in ISO format. * diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonParserFactory.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonParserFactory.java index 6f3d7ca7..3e5a3548 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonParserFactory.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/common/util/JsonParserFactory.java @@ -25,9 +25,7 @@ public class JsonParserFactory { if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", null)) { return new Jackson2JsonParser(); } - if (ClassUtils.isPresent("org.codehaus.jackson.map.ObjectMapper", null)) { - return new JacksonJsonParser(); - } + throw new IllegalStateException("No Jackson parser found. Please add Jackson to your classpath."); } diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/jwt/JwtHelper.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/jwt/JwtHelper.java index d9657c8d..e6782952 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/jwt/JwtHelper.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/jwt/JwtHelper.java @@ -23,13 +23,14 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.CharBuffer; -import org.codehaus.jackson.JsonFactory; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonToken; import org.maxkey.authz.oauth2.jwt.crypto.sign.SignatureVerifier; import org.maxkey.authz.oauth2.jwt.crypto.sign.Signer; +import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; + /** * @author Luke Taylor */ diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/approval/Approval.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/approval/Approval.java index eafe11ce..1769c696 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/approval/Approval.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/approval/Approval.java @@ -19,12 +19,13 @@ package org.maxkey.authz.oauth2.provider.approval; import java.util.Calendar; import java.util.Date; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.map.annotate.JsonDeserialize; -import org.codehaus.jackson.map.annotate.JsonSerialize; import org.maxkey.authz.oauth2.common.util.JsonDateDeserializer; import org.maxkey.authz.oauth2.common.util.JsonDateSerializer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + /** * @author Dave Syer * @author Vidya Val diff --git a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java index 1aa6b397..b2fca52d 100644 --- a/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java +++ b/maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java @@ -47,6 +47,8 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * Basic, JDBC implementation of the client details service. */ @@ -302,29 +304,12 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg } private static JsonMapper createJsonMapper() { - if (ClassUtils.isPresent("org.codehaus.jackson.map.ObjectMapper", null)) { - return new JacksonMapper(); - } - else if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", null)) { + if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", null)) { return new Jackson2Mapper(); } return new NotSupportedJsonMapper(); } - private static class JacksonMapper implements JsonMapper { - private org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper(); - - @Override - public String write(Object input) throws Exception { - return mapper.writeValueAsString(input); - } - - @Override - public T read(String input, Class type) throws Exception { - return mapper.readValue(input, type); - } - } - private static class Jackson2Mapper implements JsonMapper { private com.fasterxml.jackson.databind.ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper(); diff --git a/maxkey-protocols/maxkey-protocol-saml-2.0/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-saml-2.0/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-saml-2.0/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.core.prefs b/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.launching.prefs b/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-protocols/maxkey-protocol-tokenbased/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-webs/.settings/org.eclipse.jdt.core.prefs b/maxkey-webs/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..35068d95 --- /dev/null +++ b/maxkey-webs/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/maxkey-webs/maxkey-web-kerberos/.classpath b/maxkey-webs/maxkey-web-kerberos/.classpath deleted file mode 100644 index 708b1a19..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.classpath +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/maxkey-webs/maxkey-web-kerberos/.project b/maxkey-webs/maxkey-web-kerberos/.project deleted file mode 100644 index f0d92db7..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-web-kerberos - maxkey-web-kerberos - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.buildship.core.prefs b/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index bf4ae98e..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-webs\:maxkey-web-kerberos diff --git a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.core.resources.prefs b/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.component b/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 9a039356..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-webs/maxkey-web-kerberos/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-webs/maxkey-web-kerberos/bin/main/META-INF/MANIFEST.MF b/maxkey-webs/maxkey-web-kerberos/bin/main/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-webs/maxkey-web-kerberos/bin/main/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-webs/maxkey-web-kerberos/bin/main/log4j.properties b/maxkey-webs/maxkey-web-kerberos/bin/main/log4j.properties deleted file mode 100644 index 7692fddb..00000000 --- a/maxkey-webs/maxkey-web-kerberos/bin/main/log4j.properties +++ /dev/null @@ -1,47 +0,0 @@ -# General Log Settings -#log4j.rootLogger=INFO,LOGFILE,stdout -log4j.rootLogger=DEBUG,LOGFILE,stdout - -#appender config:stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%c:%p %X %L] %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-d{HH:mm:ss.SSS} [%c:%p %X{$UserName$} %L] %m%n - -#appender config:LOGFILE -# log file arrcoss file size -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.LOGFILE.DatePattern=.yyyy-MM-dd -log4j.appender.LOGFILE.File=${catalina.home}/logs/kerberos.out.log -log4j.appender.LOGFILE.maxFileSize=2048KB -log4j.appender.LOGFILE.MaxBackupIndex = 5 - -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%c:%p] %m%n - -log4j.appender.DEBUG=org.apache.log4j.RollingFileAppender -log4j.appender.DEBUG.File=${catalina.home}/logs/kerberos-debug.log -log4j.appender.DEBUG.maxFileSize=2048KB -log4j.appender.DEBUG.MaxBackupIndex = 5 -log4j.appender.DEBUG.DatePattern=.yyyy-MM-dd -log4j.appender.DEBUG.layout=org.apache.log4j.PatternLayout -log4j.appender.DEBUG.layout.ConversionPattern=[%c:%p %X %L] %m%n - -#log4j.appender.ERROR=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.ERROR.DatePattern=.yyyy-MM-dd -log4j.appender.ERROR=org.apache.log4j.RollingFileAppender -log4j.appender.ERROR.File=${catalina.home}/logs/kerberos-error.log - -log4j.appender.ERROR.maxFileSize=2048KB -log4j.appender.ERROR.MaxBackupIndex = 5 - -log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR.layout.ConversionPattern=[%c:%p %X %L] %m%n - -# spring -log4j.logger.org.springframework=INFO -log4j.logger.org.springframework.aop.framework=INFO -log4j.logger.org.springframework.transaction=INFO -log4j.logger.org.springframework.transaction.support=INFO - diff --git a/maxkey-webs/maxkey-web-kerberos/bin/main/org/maxkey/util/PathUtilsFile.properties b/maxkey-webs/maxkey-web-kerberos/bin/main/org/maxkey/util/PathUtilsFile.properties deleted file mode 100644 index 6a2b0ac4..00000000 --- a/maxkey-webs/maxkey-web-kerberos/bin/main/org/maxkey/util/PathUtilsFile.properties +++ /dev/null @@ -1 +0,0 @@ -v1.0.1 \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/build.gradle b/maxkey-webs/maxkey-web-kerberos/build.gradle deleted file mode 100644 index f696aed3..00000000 --- a/maxkey-webs/maxkey-web-kerberos/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -description = "maxkey-web-kerberos" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -dependencies { - compile fileTree(dir: 'lib/', include: '*.jar') -} - -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'kerberos' - - } - - } -} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/lib/commons-beanutils-1.9.1.jar b/maxkey-webs/maxkey-web-kerberos/lib/commons-beanutils-1.9.1.jar deleted file mode 100644 index 2cf4aa19..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/commons-beanutils-1.9.1.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/commons-codec-1.9.jar b/maxkey-webs/maxkey-web-kerberos/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/commons-logging-1.1.1.jar b/maxkey-webs/maxkey-web-kerberos/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/jackson-all-1.9.11.jar b/maxkey-webs/maxkey-web-kerberos/lib/jackson-all-1.9.11.jar deleted file mode 100644 index 4ad30952..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/jackson-all-1.9.11.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/joda-time-2.2.jar b/maxkey-webs/maxkey-web-kerberos/lib/joda-time-2.2.jar deleted file mode 100644 index 69fa9240..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/joda-time-2.2.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/jstl-impl.jar b/maxkey-webs/maxkey-web-kerberos/lib/jstl-impl.jar deleted file mode 100644 index 0dd43166..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/jstl-impl.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/jul-to-slf4j-1.7.7.jar b/maxkey-webs/maxkey-web-kerberos/lib/jul-to-slf4j-1.7.7.jar deleted file mode 100644 index c26621ad..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/jul-to-slf4j-1.7.7.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/log4j-1.2.17.jar b/maxkey-webs/maxkey-web-kerberos/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf7..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-api-1.7.7.jar b/maxkey-webs/maxkey-web-kerberos/lib/slf4j-api-1.7.7.jar deleted file mode 100644 index b28e220b..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-api-1.7.7.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-log4j12-1.7.7.jar b/maxkey-webs/maxkey-web-kerberos/lib/slf4j-log4j12-1.7.7.jar deleted file mode 100644 index 12c804eb..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-log4j12-1.7.7.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-nop-1.7.7.jar b/maxkey-webs/maxkey-web-kerberos/lib/slf4j-nop-1.7.7.jar deleted file mode 100644 index d73cb9b0..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/slf4j-nop-1.7.7.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-aop-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-aop-4.0.0.RELEASE.jar deleted file mode 100644 index 5f021231..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-aop-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-aspects-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-aspects-4.0.0.RELEASE.jar deleted file mode 100644 index a8b0957e..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-aspects-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-beans-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-beans-4.0.0.RELEASE.jar deleted file mode 100644 index ae17d710..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-beans-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-context-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-context-4.0.0.RELEASE.jar deleted file mode 100644 index bcfcebb1..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-context-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-context-support-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-context-support-4.0.0.RELEASE.jar deleted file mode 100644 index d839da43..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-context-support-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-core-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-core-4.0.0.RELEASE.jar deleted file mode 100644 index 205d0d64..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-core-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-expression-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-expression-4.0.0.RELEASE.jar deleted file mode 100644 index 82069bf9..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-expression-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-4.0.0.RELEASE.jar deleted file mode 100644 index 658cd232..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-tomcat-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-tomcat-4.0.0.RELEASE.jar deleted file mode 100644 index a319d982..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-instrument-tomcat-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-jdbc-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-jdbc-4.0.0.RELEASE.jar deleted file mode 100644 index f593c01d..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-jdbc-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-jms-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-jms-4.0.0.RELEASE.jar deleted file mode 100644 index f6abde3b..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-jms-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-messaging-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-messaging-4.0.0.RELEASE.jar deleted file mode 100644 index 5cc1fd2c..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-messaging-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-orm-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-orm-4.0.0.RELEASE.jar deleted file mode 100644 index 2efded25..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-orm-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-oxm-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-oxm-4.0.0.RELEASE.jar deleted file mode 100644 index b657ecd6..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-oxm-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-config-3.2.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-security-config-3.2.0.RELEASE.jar deleted file mode 100644 index 4f654af6..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-config-3.2.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-core-3.2.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-security-core-3.2.0.RELEASE.jar deleted file mode 100644 index 0f76aab0..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-core-3.2.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-crypto-3.2.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-security-crypto-3.2.0.RELEASE.jar deleted file mode 100644 index aee07276..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-crypto-3.2.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-taglibs-3.2.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-security-taglibs-3.2.0.RELEASE.jar deleted file mode 100644 index ca6c1a86..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-taglibs-3.2.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-web-3.2.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-security-web-3.2.0.RELEASE.jar deleted file mode 100644 index 636cd654..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-security-web-3.2.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-test-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-test-4.0.0.RELEASE.jar deleted file mode 100644 index 5b1d3763..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-test-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-tx-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-tx-4.0.0.RELEASE.jar deleted file mode 100644 index e1eead1d..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-tx-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-web-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-web-4.0.0.RELEASE.jar deleted file mode 100644 index f50593f6..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-web-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-webmvc-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-webmvc-4.0.0.RELEASE.jar deleted file mode 100644 index 27971151..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-webmvc-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/lib/spring-websocket-4.0.0.RELEASE.jar b/maxkey-webs/maxkey-web-kerberos/lib/spring-websocket-4.0.0.RELEASE.jar deleted file mode 100644 index 34b1c22d..00000000 Binary files a/maxkey-webs/maxkey-web-kerberos/lib/spring-websocket-4.0.0.RELEASE.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/META-INF/MANIFEST.MF b/maxkey-webs/maxkey-web-kerberos/src/main/java/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/log4j.properties b/maxkey-webs/maxkey-web-kerberos/src/main/java/log4j.properties deleted file mode 100644 index 7692fddb..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/log4j.properties +++ /dev/null @@ -1,47 +0,0 @@ -# General Log Settings -#log4j.rootLogger=INFO,LOGFILE,stdout -log4j.rootLogger=DEBUG,LOGFILE,stdout - -#appender config:stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%c:%p %X %L] %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-d{HH:mm:ss.SSS} [%c:%p %X{$UserName$} %L] %m%n - -#appender config:LOGFILE -# log file arrcoss file size -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.LOGFILE.DatePattern=.yyyy-MM-dd -log4j.appender.LOGFILE.File=${catalina.home}/logs/kerberos.out.log -log4j.appender.LOGFILE.maxFileSize=2048KB -log4j.appender.LOGFILE.MaxBackupIndex = 5 - -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%c:%p] %m%n - -log4j.appender.DEBUG=org.apache.log4j.RollingFileAppender -log4j.appender.DEBUG.File=${catalina.home}/logs/kerberos-debug.log -log4j.appender.DEBUG.maxFileSize=2048KB -log4j.appender.DEBUG.MaxBackupIndex = 5 -log4j.appender.DEBUG.DatePattern=.yyyy-MM-dd -log4j.appender.DEBUG.layout=org.apache.log4j.PatternLayout -log4j.appender.DEBUG.layout.ConversionPattern=[%c:%p %X %L] %m%n - -#log4j.appender.ERROR=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.ERROR.DatePattern=.yyyy-MM-dd -log4j.appender.ERROR=org.apache.log4j.RollingFileAppender -log4j.appender.ERROR.File=${catalina.home}/logs/kerberos-error.log - -log4j.appender.ERROR.maxFileSize=2048KB -log4j.appender.ERROR.MaxBackupIndex = 5 - -log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR.layout.ConversionPattern=[%c:%p %X %L] %m%n - -# spring -log4j.logger.org.springframework=INFO -log4j.logger.org.springframework.aop.framework=INFO -log4j.logger.org.springframework.transaction=INFO -log4j.logger.org.springframework.transaction.support=INFO - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/Base64Utils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/Base64Utils.java deleted file mode 100644 index d601999f..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/Base64Utils.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.maxkey.crypto; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; - -import org.apache.commons.codec.binary.Base64; - - -/** - * Base64 Utils - * - * @author Crystal.Sea - * - */ -public final class Base64Utils { - - - - public static String encodeBase64(byte[] simple){ - String cipher=BytesUtils.bytes2String(Base64.encodeBase64(simple)); - return cipher; - } - - public static byte[] decoderBase64(String cipher){ - byte[] simple=Base64.decodeBase64(cipher); - return simple; - } - - public static String encode(String simple){ - return encodeBase64(simple.getBytes()); - } - - public static String encoder(byte[] simple){ - return encodeBase64(simple); - } - - public static String decode(String cipher){ - return BytesUtils.bytes2String(decoderBase64(cipher)); - } - - public static byte[] decoder(String cipher){ - return decoderBase64(cipher); - } - - - /** - *encode file to base64 Code String - * @param fileName file path - * @return * - * @throws Exception - */ - - public static String fileToBase64(String fileName) throws Exception { - File file = new File(fileName);; - FileInputStream inputFile = new FileInputStream(file); - byte[] buffer = new byte[(int) file.length()]; - inputFile.read(buffer); - inputFile.close(); - return encodeBase64(buffer); - - } - - /** - * base64 Code decode String save to targetPath - * @param base64Code - * @param targetPath - * @throws Exception - */ - - public static void decodeBase64ToFile(String base64Code, String targetPath) - throws Exception { - byte[] buffer = decoderBase64(base64Code); - FileOutputStream out = new FileOutputStream(targetPath); - out.write(buffer); - out.close(); - - } - - /** - * base64 code save to file - * @param base64Code - * @param targetPath - * @throws Exception - */ - - public static void base64ToFile(String base64Code, String targetPath) - throws Exception { - byte[] buffer = base64Code.getBytes(); - FileOutputStream out = new FileOutputStream(targetPath); - out.write(buffer); - out.close(); - } - - public static String base64UrlEncode(byte[] simple) { - String s = new String(Base64.encodeBase64(simple)); // Regular base64 - // encoder - s = s.split("=")[0]; // Remove any trailing '='s - s = s.replace('+', '-'); // 62nd char of encoding - s = s.replace('/', '_'); // 63rd char of encoding - return s; - } - - public static byte[] base64UrlDecode(String cipher) { - String s = cipher; - s = s.replace('-', '+'); // 62nd char of encoding - s = s.replace('_', '/'); // 63rd char of encoding - switch (s.length() % 4) { // Pad with trailing '='s - case 0: - break; // No pad chars in this case - case 2: - s += "=="; - break; // Two pad chars - case 3: - s += "="; - break; // One pad char - default: - System.err.println("Illegal base64url String!"); - } - return Base64.decodeBase64(s); // Standard base64 decoder - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/BytesUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/BytesUtils.java deleted file mode 100644 index 6e0dceec..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/BytesUtils.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.maxkey.crypto; - -public final class BytesUtils { - - public static String bytes2String(byte[] bytesArray) { - String result = ""; - for (Byte bts : bytesArray) { - result += (char) bts.intValue(); - } - return result; - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/HexUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/HexUtils.java deleted file mode 100644 index 9924025d..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/HexUtils.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - */ -package org.maxkey.crypto; - -import java.io.UnsupportedEncodingException; - -/** - * @author Crystal.Sea - * - */ -public final class HexUtils { - - static final byte[] HEX_CHAR_TABLE = { (byte) '0', (byte) '1', (byte) '2', - (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', - (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', - (byte) 'd', (byte) 'e', (byte) 'f' }; - - - public static String hex2String(byte[] b) { - String result = ""; - for (int i = 0; i < b.length; i++) { - result += Integer.toString((b[i] & 0xff) + 0x100, 16).substring(1); - } - return result; - } - - public static String bytes2HexString(byte[] raw) { - byte[] hex = new byte[2 * raw.length]; - int index = 0; - - for (byte b : raw) { - int v = b & 0xFF; - hex[index++] = HEX_CHAR_TABLE[v >>> 4]; - hex[index++] = HEX_CHAR_TABLE[v & 0xF]; - } - String s = ""; - try { - s = new String(hex, "ASCII"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - return s; - } - - public static byte[] hex2Bytes(char[] hex) { - int length = hex.length / 2; - byte[] raw = new byte[length]; - for (int i = 0; i < length; i++) { - int high = Character.digit(hex[i * 2], 16); - int low = Character.digit(hex[i * 2 + 1], 16); - int value = (high << 4) | low; - if (value > 127) - value -= 256; - raw[i] = (byte) value; - } - return raw; - } - - public static byte[] hex2Bytes(String hex) { - return hex2Bytes(hex.toCharArray()); - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/ReciprocalUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/ReciprocalUtils.java deleted file mode 100644 index 6731bbc7..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/ReciprocalUtils.java +++ /dev/null @@ -1,273 +0,0 @@ -/** - * - */ -package org.maxkey.crypto; - -import java.io.UnsupportedEncodingException; -import java.security.Security; - -import javax.crypto.Cipher; -import javax.crypto.SecretKey; -import javax.crypto.spec.SecretKeySpec; - -import org.apache.commons.logging.LogFactory; -import org.maxkey.util.StringGenerator; - -/** - * Reciprocal cipher or Symmetric-key algorithm - * - * algorithm Support DES,DESede,Blowfish and AES - * - * default key value use ReciprocalUtils.defaultKey - * - * generateKey is generate random key for algorithm - * - * @author Crystal.Sea - * - */ -public final class ReciprocalUtils { - - private static final String defaultKey = "l0JqT7NvIzP9oRaG4kFc1QmD_bWu3x8E5yS2h6"; // - - public final class Algorithm { - public static final String DES = "DES"; - public static final String DESede = "DESede"; - public static final String Blowfish = "Blowfish"; - public static final String AES = "AES"; - } - - public static byte[] encode(byte[] simpleBytes, SecretKey secretKey,String algorithm) { - // Create the ciphers - Cipher ecipher; - byte[] byteFinal = null; - try { - ecipher = Cipher.getInstance(secretKey.getAlgorithm()); - // Encode the string into bytes using utf-8 - ecipher.init(Cipher.ENCRYPT_MODE, secretKey); - // Encrypt - byteFinal = ecipher.doFinal(simpleBytes); - return byteFinal; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * @param simple - * @param secretKey - * must length - * @return - * @throws Exception - */ - public static byte[] encode(String simple, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - SecretKey key = generatorKey(secretKey, algorithm); - try { - return encode(simple.getBytes("UTF-8"), key, algorithm); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - return null; - } - - public static byte[] decoder(byte[] ciphersBytes, SecretKey secretKey,String algorithm) { - Cipher cipher; - byte[] byteFinal = null; - try { - cipher = Cipher.getInstance(algorithm); - cipher.init(Cipher.DECRYPT_MODE, secretKey); - byteFinal = cipher.doFinal(ciphersBytes); - // String simple=new String(byteFinal, "UTF8" ); - // return simple; - return byteFinal; - } catch (Exception e) { - e.printStackTrace(); - } finally { - cipher = null; - } - return null; - } - - public static String decoder(byte[] ciphersBytes, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - SecretKey key = generatorKey(secretKey, algorithm); - try { - return new String(decoder(ciphersBytes, key, algorithm), "UTF8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - return null; - } - - public static byte[] encodeByDefaultKey(String simple, String algorithm) { - SecretKey key = generatorDefaultKey(algorithm); - return encode(simple.getBytes(), key, algorithm); - - } - - public static String encode2HexByDefaultKey(String simple, String algorithm) { - byte[] byteFinal = encodeByDefaultKey(simple, algorithm); - - String cipherHex = HexUtils.bytes2HexString(byteFinal); - return cipherHex; - } - - public static byte[] decoderByDefaultKey(byte[] byteCiphers,String algorithm) { - SecretKey key = generatorDefaultKey(algorithm); - return decoder(byteCiphers, key, algorithm); - - } - - public static String decoderHexByDefaultKey(String ciphers, String algorithm) { - byte[] byteSimple = HexUtils.hex2Bytes(ciphers); - byte[] byteFinal = decoderByDefaultKey(byteSimple, algorithm); - - String simple = null; - try { - simple = new String(byteFinal, "UTF-8"); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return simple; - - } - - public static SecretKey generatorDefaultKey(String algorithm) { - try { - Security.addProvider(new com.sun.crypto.provider.SunJCE()); - String secretKey=defaultKey; - if(algorithm.equals(Algorithm.DES)){ - secretKey=defaultKey.substring(0, 8); - }else if(algorithm.equals(Algorithm.AES)||algorithm.equals(Algorithm.Blowfish)){ - secretKey=defaultKey.substring(0, 16); - }else if(algorithm.equals(Algorithm.DESede)){ - secretKey=defaultKey.substring(0, 24); - } - //System.out.println("defaultKey : "+secretKey); - SecretKey key = new SecretKeySpec(secretKey.getBytes(), algorithm); - return key; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - private static SecretKey generatorKey(String secretKey, String algorithm) { - try { - SecretKey key = new SecretKeySpec(secretKey.getBytes(), algorithm); - return key; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - public static String encode2Hex(String simple, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - byte[] cipher = encode(simple, secretKey, algorithm); - // Encode bytes to HEX to get a string - return HexUtils.bytes2HexString(cipher); - } - return null; - } - - public static String decoderHex(String ciphers, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - byte[] byteSimple = HexUtils.hex2Bytes(ciphers); - - return decoder(byteSimple, secretKey, algorithm); - } - return null; - } - - private static boolean keyLengthCheck(String secretKey, String algorithm) { - boolean lengthCheck = false; - if (algorithm.equals(Algorithm.DES)) { - if (secretKey.length() == 8) { - lengthCheck = true; - } else { - LogFactory.getLog(ReciprocalUtils.class).debug( - "key length is " + secretKey.getBytes().length - + " ,must lequal 8"); - } - } else if (algorithm.equals(Algorithm.DESede)) { - if (secretKey.length() == 24) { - lengthCheck = true; - } else { - LogFactory.getLog(ReciprocalUtils.class).debug( - "key length is " + secretKey.getBytes().length - + " ,must equal 24"); - } - } else if (algorithm.equals(Algorithm.AES)) { - if (secretKey.length() == 16) { - lengthCheck = true; - } else { - LogFactory.getLog(ReciprocalUtils.class).debug( - "key length is " + secretKey.getBytes().length - + " ,must equal 16"); - } - } else if (algorithm.equals(Algorithm.Blowfish)) { - if (secretKey.length() <= 16) { - lengthCheck = true; - } else { - LogFactory.getLog(ReciprocalUtils.class).debug( - "key length is " + secretKey.getBytes().length - + " ,must be less then 16"); - } - } - return lengthCheck; - } - - /** - * @param simple - * @param secretKey - * must length is 16 - * @return - */ - public static String aesEncode(String simple, String secretKey) { - return encode2Hex(simple, secretKey, Algorithm.AES); - } - - public static String aesDecoder(String ciphers, String secretKey) { - return decoderHex(ciphers, secretKey, Algorithm.AES); - } - - /** - * encode by defaultKey with Algorithm.AES - * - * @param simple - * @return Hex - */ - public static String encode(String simple) { - return encode2HexByDefaultKey(simple, Algorithm.AES); - } - - /** - * decoder by defaultKey with Algorithm.AES - * - * @param ciphers is HEX - * - * @return - */ - public static String decoder(String ciphers) { - return decoderHexByDefaultKey(ciphers, Algorithm.AES); - } - - public static String generateKey(String algorithm) { - if (algorithm.equals(Algorithm.DES)) { - return (new StringGenerator(8)).randomGenerate(); - } else if (algorithm.equals(Algorithm.AES)) { - return (new StringGenerator(16)).randomGenerate(); - } else if (algorithm.equals(Algorithm.Blowfish)) { - return (new StringGenerator(16)).randomGenerate(); - } else if (algorithm.equals(Algorithm.DESede)) { - return (new StringGenerator(24)).randomGenerate(); - } else { - return (new StringGenerator()).uniqueGenerate(); - } - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/StringGenerator.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/StringGenerator.java deleted file mode 100644 index 855be4e5..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/crypto/StringGenerator.java +++ /dev/null @@ -1,139 +0,0 @@ -package org.maxkey.crypto; - -import java.lang.management.ManagementFactory; -import java.security.SecureRandom; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Random; -import java.util.UUID; - -import org.maxkey.crypto.Base64Utils; - -public class StringGenerator { - - private static final int MAX_PID = 65536; - - private char[] DEFAULT_CODEC = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_NUMBER = "1234567890".toCharArray(); - - public static final char[] DEFAULT_CODE_LOWERCASE = "abcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray(); - - public static final char[] DEFAULT_CODE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_NUMBER_LETTERS = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static int processId; - - private static final String uuidRegex = "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$"; - - - private Random random = new SecureRandom(); - - private int length; - - static { - final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); - int index = jvmName.indexOf('@'); - if (index < 1) - throw new RuntimeException("Could not get PID"); - - try { - processId= Integer.parseInt(jvmName.substring(0, index)) % MAX_PID; - } catch (NumberFormatException e) { - throw new RuntimeException("Could not get PID"); - } - } - - /** - * Create a generator with the default length (6). - */ - public StringGenerator() { - this(6); - } - - /** - * Create a generator of random strings of the length provided - * - * @param length the length of the strings generated - */ - public StringGenerator(int length) { - this.length = length; - } - - public StringGenerator(char[] defaultCode,int length) { - this.DEFAULT_CODEC=defaultCode; - this.length = length; - } - - public String randomGenerate() { - byte[] verifierBytes = new byte[length]; - random.nextBytes(verifierBytes); - return getString(verifierBytes); - } - - public String uuidGenerate() { - return UUID.randomUUID().toString().toLowerCase(); - } - - public String uniqueGenerate() { - StringBuffer uniqueString=new StringBuffer(""); - - this.length=9; - String randomString =randomGenerate(); - uniqueString.append(randomString.subSequence(0, 4)); - - Date currentDate=new Date(); - DateFormat dateFormat = new SimpleDateFormat("ddMMyyyyHHmmssSSS"); - String dateString=Base64Utils.encodeBase64(dateFormat.format(currentDate).getBytes()); - dateString=dateString.substring(0, dateString.length()-1); - uniqueString.append(dateString); - - uniqueString.append(randomString.subSequence(5, 8)); - - return uniqueString.toString(); - } - - /** - * Convert these random bytes to a verifier string. The length of the byte array can be - * {@link #setLength(int) configured}. The default implementation mods the bytes to fit into the - * ASCII letters 1-9, A-Z, a-z . - * - * @param verifierBytes The bytes. - * @return The string. - */ - protected String getString(byte[] verifierBytes) { - char[] chars = new char[verifierBytes.length]; - for (int i = 0; i < verifierBytes.length; i++) { - chars[i] = DEFAULT_CODEC[((verifierBytes[i] & 0xFF) % DEFAULT_CODEC.length)]; - } - return new String(chars); - } - - /** - * The random value generator used to create token secrets. - * - * @param random The random value generator used to create token secrets. - */ - public void setRandom(Random random) { - this.random = random; - } - - /** - * The length of string to generate. - * - * @param length the length to set - */ - public void setLength(int length) { - this.length = length; - } - - - public static boolean uuidMatches(String uuidString) { - return uuidString.matches(uuidRegex); - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/BeanUtil.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/BeanUtil.java deleted file mode 100644 index 95daf094..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/BeanUtil.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.maxkey.util; - -import java.util.Collection; -import java.util.Map; - -import org.apache.commons.beanutils.BeanUtils; - -public class BeanUtil { - - public static void copyBean(Object origin,Object target) { - if( origin == null || target == null) return; - try { - BeanUtils.copyProperties( origin, target); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public static Object cloneSupper(Object origin) { - Object target = null; - if(origin == null) return target; - try { - target = origin.getClass().getSuperclass().newInstance(); - BeanUtils.copyProperties(target,origin); - } catch (Exception e) { - e.printStackTrace(); - } - return target; - } - - public static String getValue(Object bean,String field ) { - if(bean == null) return null; - String retVal = ""; - try { - retVal = BeanUtils.getProperty(bean, field); - } catch(Exception e) { - e.printStackTrace(); - } - return retVal; - } - - @SuppressWarnings("rawtypes") - public static boolean isNotNull(Collection collection) { - if(collection != null && collection.size() > 0) { - return true; - } - return false; - } - - @SuppressWarnings("rawtypes") - public static boolean isNotNull(Map map) { - if(map != null && map.size() > 0) { - return true; - } - return false; - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/DateUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/DateUtils.java deleted file mode 100644 index c6b96df2..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/DateUtils.java +++ /dev/null @@ -1,690 +0,0 @@ - -package org.maxkey.util; -import java.sql.Timestamp; -import java.text.ParseException; -import java.text.SimpleDateFormat; - -import java.util.Calendar; -import java.util.Date; - -import org.joda.time.DateTime; -import org.joda.time.chrono.ISOChronology; - - - -public class DateUtils { - public final static String FORMAT_DATE_DEFAULT = "yyyy-MM-dd"; - - public final static String FORMAT_DATE_YYYYMMDD = "yyyyMMdd"; - - public final static String FORMAT_DATE_YYYY_MM_DD = "yyyy-MM-dd"; - - public final static String FORMAT_DATE_PATTERN_1="yyyy/MM/dd"; - public final static String FORMAT_DATE_PATTERN_2="yyyy/M/dd"; - public final static String FORMAT_DATE_PATTERN_3="yyyy/MM/d"; - public final static String FORMAT_DATE_PATTERN_4="yyyy/M/d"; - public final static String FORMAT_DATE_YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; - - public final static String FORMAT_DATE_ISO_TIMESTAMP="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; - - public final static String FORMAT_DATE_YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - - public final static String FORMAT_DATE_YYYY_MM_DD_HHMM = "yyyy-MM-dd HHmm"; - - public final static String FORMAT_DATE_YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm"; - - public final static String FORMAT_DATE_HH_MM = "HH:mm"; - - public final static String FORMAT_DATE_HH_MM_SS = "HH:mm:ss"; - - public final static String FORMAT_DATE_HHMM = "HHmm"; - - public final static String FORMAT_DATE_HHMMSS = "HHmmss"; - - public static final String FORMAT_WORK_TIME = "yyyy-MM-dd HHmmss"; - /** - * Compares two Dates from their string value. - * - * @param stringValue1 - * Date 1 as string value. - * @param stringValue2 - * Date 2 as string value. - * - * @return the value 0 if the argument stringValue1 is equal - * to stringValue2; a value less than 0 if this - * stringValue1 is before the stringValue2 as Date; and a value - * greater than 0 if this stringValue1 is after the - * stringValue2. - * @since 1.2 - */ - public final static int compareDate(String stringValue1, String stringValue2) - throws ParseException { - Date date1 = tryParse(stringValue1); - if (date1 == null) - throw new ParseException("Can not parse " + stringValue1 - + " to Date.", 0); - Date date2 = tryParse(stringValue2); - if (date2 == null) - throw new ParseException("Can not parse " + stringValue1 - + " to Date.", 0); - return date1.compareTo(date2); - } - - /** - * Returns current system date as formatted string value with default format - * pattern. - * - * @return current system date. - * - * @see #FORMAT_DATE_DEFAULT - */ - public final static String getCurrentDateAsString() { - return getCurrentDateAsString(FORMAT_DATE_DEFAULT); - } - - /** - * Returns current system date as formatted string value with given format - * pattern. - * - * @param formatPattern - * format pattern. - * @return current system date. - * - */ - public final static String getCurrentDateAsString(String formatPattern) { - Date date = new Date(); - return format(date, formatPattern); - } - - public final static String getFormtPattern1ToPattern2(String stringValue,String formatPattern1,String formatPattern2){ - Date date = parse(stringValue, formatPattern1); - return format(date, formatPattern2); - } - - /** - * Returns current system date. - * - * @return current system date. - */ - public final static Date getCurrentDate() { - return new Date(); - } - - /** - * 0������, 1����һ, 2���ڶ�, 3������, 4������, 5������,6������ - * @return - */ - public final static String getTodayOfWeek(){ - Calendar calendar = Calendar.getInstance(); - Date date = new Date(); - calendar.setTime(date); - int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK)-1; - return dayOfWeek+""; - } - - /** - * �Ƚ�ʱ���ǰ���� 6:00-12:00 - * @param startTime - * @param endTime - * @return - */ - public final static boolean compareTime(String startTime,String endTime) throws ParseException{ - SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); - Date start = sdf.parse(startTime); - Date end = sdf.parse(endTime); - if(start.before(end)){ - return true; - } - return false; - } - - /** - * 判断value时间值是否在date时间之前 - * @param value - * @param date - * @param datePattern - * @return - */ - public static boolean compareTime(String endDate,Date startDate,String datePattern) { - Date valueDate = DateUtils.parse(endDate, datePattern); - return valueDate.before(startDate); - } - - /** - * Format Date value as string value with default format pattern. - * - * @param date - * Date value. - * @return formatted date as string value. - * - * @see #FORMAT_DATE_DEFAULT - */ - public final static String format(Date date) { - if (date == null) { - return ""; - } - return format(date, FORMAT_DATE_DEFAULT); - } - - /** - * Format Date value as string value with default format pattern. - * - * @param date - * Date value. - * @return formatted date as string value. - * - * @see #FORMAT_DATE_DEFAULT - */ - public final static String formatDateTime(Date date) { - if (date == null) { - return ""; - } - return format(date, FORMAT_DATE_YYYY_MM_DD_HH_MM_SS); - } - - /** - * Format Date value as string value with default format pattern. - * - * @param date - * Date value. - * @return formatted date as string value. - * - * @see #FORMAT_DATE_DEFAULT - */ - public final static String formatTimestamp(Date date) { - if (date == null) { - return ""; - } - return format(date, "yyyy-MM-dd HH:mm:ss.SSS"); - } - - /** - * Format Date value as string value with default format pattern. - * - * @param date - * Date value. - * @return formatted date as string value. - * - * @see #FORMAT_DATE_DEFAULT - */ - public final static Date parseTimestamp(String date) { - if (date == null) { - return null; - } - return parse(date, "yyyy-MM-dd HH:mm:ss.SSS"); - } - - /** - * Format Date value as string value with given format pattern. - * - * @param date - * Date value. - * @param formatPattern - * format pattern. - * @return formatted date as string value. - * - * @see #FORMAT_DATE_DEFAULT - * @see #FORMAT_DATE_YYYY_MM_DD - * @see #FORMAT_DATE_YYYY_MM_DD_HH_MM - * @see #FORMAT_DATE_YYYY_MM_DD_HH_MM_SS - * @see #FORMAT_DATE_YYYY_MM_DD_HHMMSS - */ - public final static String format(Date date, String formatPattern) { - if (date == null) { - return ""; - } - return new SimpleDateFormat(formatPattern).format(date); - } - - /** - * Parse string value to Date with default format pattern. - * - * @param stringValue - * date value as string. - * @return Date represents stringValue. - * @see #FORMAT_DATE_DEFAULT - */ - public final static Date parse(String stringValue) { - return parse(stringValue, FORMAT_DATE_DEFAULT); - } - - /** - * Parse string value to Date with given format pattern. - * - * @param stringValue - * date value as string. - * @param formatPattern - * format pattern. - * @return Date represents stringValue, null while parse exception occurred. - * @see #FORMAT_DATE_DEFAULT - */ - public final static Date parse(String stringValue, String formatPattern) { - SimpleDateFormat format = new SimpleDateFormat(formatPattern); - try { - return format.parse(stringValue); - } catch (ParseException e) { - e.printStackTrace(); - } - return null; - } - - - /** - * Try to parse string value to date. - * - * @param stringValue - * string value. - * @return Date represents stringValue, null while parse exception occurred. - */ - public final static Date tryParse(String stringValue) { - Date date = parse(stringValue, FORMAT_DATE_YYYY_MM_DD); - if (date != null) { - return date; - } - date = parse(stringValue, FORMAT_DATE_YYYYMMDD); - if (date != null) { - return date; - } - date = parse(stringValue, FORMAT_DATE_YYYYMMDDHHMMSS); - if (date != null) { - return date; - } - date = parse(stringValue, FORMAT_DATE_YYYY_MM_DD_HH_MM_SS); - if (date != null) { - return date; - } - date = parse(stringValue, FORMAT_DATE_YYYY_MM_DD_HHMM); - if (date != null) { - return date; - } - date = parse(stringValue,FORMAT_DATE_PATTERN_1); - if (date != null) { - return date; - } - date=parse(stringValue, FORMAT_DATE_PATTERN_2); - if (date != null) { - return date; - } - date=parse(stringValue, FORMAT_DATE_PATTERN_3); - if (date != null) { - return date; - } - date=parse(stringValue, FORMAT_DATE_PATTERN_4); - if (date != null) { - return date; - } - return date; - } - - /** - * get day of week - * @param SUN_FST_DAY_OF_WEEK - * @return - */ - public static int getDayOfWeek(int SUN_FST_DAY_OF_WEEK) { - if (SUN_FST_DAY_OF_WEEK > 7 || SUN_FST_DAY_OF_WEEK < 1) - return 0; - if (SUN_FST_DAY_OF_WEEK == 1) - return 7; - return SUN_FST_DAY_OF_WEEK - 1; - } - - public static Timestamp parseTimestamp(String stringValue, - String formatPattern) { - return new Timestamp(parse(stringValue, formatPattern).getTime()); - } - - public static Timestamp parseTimestamp(Date d) { - return new Timestamp(d.getTime()); - } - //----------------------------------------------------------------------- - /** - * Adds a number of milliseconds to a date returning a new object. - * The original date object is unchanged. - * - * @param date the date, not null - * @param amount the amount to add, may be negative - * @return the new date object with the amount added - * @throws IllegalArgumentException if the date is null - */ - public static Date addMilliseconds(Date date, int amount) { - return add(date, Calendar.MILLISECOND, amount); - } - - //----------------------------------------------------------------------- - /** - * Adds a number of minutes to a date returning a new object. - * The original date object is unchanged. - * - * @param date the date, not null - * @param amount the amount to add, may be negative - * @return the new date object with the amount added - * @throws IllegalArgumentException if the date is null - */ - public static Date addMinutes(Date date, int amount) { - return add(date, Calendar.MINUTE, amount); - } - //----------------------------------------------------------------------- - /** - * Adds to a date returning a new object. - * The original date object is unchanged. - * - * @param date the date, not null - * @param calendarField the calendar field to add to - * @param amount the amount to add, may be negative - * @return the new date object with the amount added - * @throws IllegalArgumentException if the date is null - * - */ - public static Date add(Date date, int calendarField, int amount) { - if (date == null) { - throw new IllegalArgumentException("The date must not be null"); - } - Calendar c = Calendar.getInstance(); - c.setTime(date); - c.add(calendarField, amount); - return c.getTime(); - } - - public static String getExchangeFormat(String dateStr,String sourFormat,String destFormat){ - String dt=""; - try{ - SimpleDateFormat sdf=new SimpleDateFormat(destFormat); - dt=sdf.format(parse(dateStr,sourFormat)); - }catch(Exception e){ - e.printStackTrace(); - } - return dt; - } - - public static Date plugOneDate(Date date) { - return new Date(date.getTime() + 24*60*60*1000L); - } - - /** - * ���date�ĺ�һ�죬��ʱ����ֱ�Ϊ00:00:00 - * @param date - * @return - */ - public static Date getNextDay(Date date) { - Date nextDay = new Date(date.getTime() + 24*60*60*1000L); - // Get Calendar object set to the date and time of the given Date object - Calendar cal = Calendar.getInstance(); - cal.setTime(nextDay); - // Set time fields to zero - cal.set(Calendar.HOUR_OF_DAY, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MILLISECOND, 0); - // Put it back in the Date object - nextDay = cal.getTime(); - return nextDay; - } - - /** - * ɾ��date�е�ʱ���֡��롢���� - * - * @param date - * @return - */ - public static Date truncateTime(Date date) { - if (date == null) { - return null; - } - - Calendar c = Calendar.getInstance(); - c.setTime(date); - c.set(Calendar.HOUR_OF_DAY, 0); - c.set(Calendar.MINUTE, 0); - c.set(Calendar.SECOND, 0); - c.set(Calendar.MILLISECOND, 0); - - return c.getTime(); - } - - /** - * �Ը�ʱ��date��������ƶ�(��ǰ�ƶ�)���� - * - * @param date - * @param year - * @param month - * @param day - * @param hour - * @param minute - * @param second - * @param milliSecond - * @return - */ - public static Date addDate(Date date, int year, int month, int day, int hour, int minute, int second, int milliSecond) { - if (date == null) { - return null; - } - - Calendar c = Calendar.getInstance(); - c.setTime(date); - c.add(Calendar.YEAR, year); - c.add(Calendar.MONTH, month); - c.add(Calendar.DATE, day); - c.add(Calendar.HOUR_OF_DAY, hour); - c.add(Calendar.MINUTE, minute); - c.add(Calendar.SECOND, second); - c.add(Calendar.MILLISECOND, milliSecond); - - return c.getTime(); - } - - public static Date addDate(Date date, int year, int month, int day, int hour, int minute, int second) { - return addDate(date, year, month, day, hour, minute, second, 0); - } - - public static Date addDate(Date date, int hour, int minute, int second) { - return addDate(date, 0, 0, 0, hour, minute, second, 0); - } - - /** - * ����day1��day2�������(day1-day2)������ - * - * @param day1 - * @param day2 - * @return - */ - public static int getIntervalDays(Date day1, Date day2) { - if (day1 == null || day2 == null) { - throw new IllegalArgumentException("Argument day1 or day2 must be not null."); - } - - Date day1ToUse = truncateTime(day1); - Date day2ToUse = truncateTime(day2); - long intervalMilliSecond = getIntervalMilliSeconds(day1ToUse, day2ToUse); - - return (int) (intervalMilliSecond / (24 * 60 * 60 * 1000)); - } - - /** - * ����day1��day2�������(day1-day2)���·� - * - * @param day1 - * @param day2 - * @return - */ - public static int getIntervalMonths(Date day1, Date day2) { - if (day1 == null || day2 == null) { - throw new IllegalArgumentException("Argument day1 or day2 must be not null."); - } - - Calendar calDay1 = Calendar.getInstance(); - calDay1.setTime(day1); - Calendar calDay2 = Calendar.getInstance(); - calDay2.setTime(day2); - - int yearInterval = calDay1.get(Calendar.YEAR) - calDay2.get(Calendar.YEAR); - int monthInterval = calDay1.get(Calendar.MONTH) - calDay2.get(Calendar.MONTH); - - return yearInterval * 12 + monthInterval; - } - - /** - * ����day1��day2�������(day1-day2)���� - * - * @param day1 - * @param day2 - * @return - */ - public static int getIntervalYears(Date day1, Date day2) { - if (day1 == null || day2 == null) { - throw new IllegalArgumentException("Argument day1 or day2 must be not null."); - } - - Calendar calDay1 = Calendar.getInstance(); - calDay1.setTime(day1); - Calendar calDay2 = Calendar.getInstance(); - calDay2.setTime(day2); - - return calDay1.get(Calendar.YEAR) - calDay2.get(Calendar.YEAR); - } - - private static long MILLISECOND_ONE_MINUTE = 60 * 1000; - private static long MILLISECOND_ONE_HOUR = 3600 * 1000; - private static long MILLISECOND_ONE_DAY = MILLISECOND_ONE_HOUR * 24; - - /** - * ��ʽ��(**��**Сʱ**��**��**����)��ʾstart��end��ʱ���(end-start) - * - * @param start - * @param end - * @return - */ - public static String intervalFormatDisplay(Date start, Date end) { - long minus = getIntervalMilliSeconds(end, start); - if (minus < 0) { - throw new IllegalArgumentException("The date end must great than or equal the date start."); - } - - StringBuilder interval = new StringBuilder(); - long days = minus / MILLISECOND_ONE_DAY; - if (days > 0) { - interval.append(days).append("��"); - } - - minus -= days * MILLISECOND_ONE_DAY; - long hours = minus / MILLISECOND_ONE_HOUR; - if (hours > 0) { - interval.append(hours).append("Сʱ"); - } - - minus -= hours * MILLISECOND_ONE_HOUR; - long minutes = minus / MILLISECOND_ONE_MINUTE; - if (minutes > 0) { - interval.append(minutes).append("��"); - } - - minus -= minutes * MILLISECOND_ONE_MINUTE; - long seconds = minus / 1000; - if (seconds > 0) { - interval.append(seconds).append("��"); - } - - long millis = minus - seconds * 1000; - if (millis > 0) { - interval.append(millis).append("����"); - } - - return interval.toString(); - } - - /** - * ����day1��day2ʱ�����ĺ�����(day1-day2) - * - * @param day1 - * @param day2 - * @return - */ - public static long getIntervalMilliSeconds(Date day1, Date day2) { - if (day1 == null || day2 == null) { - throw new IllegalArgumentException("Argument day1 or day2 must be not null."); - } - - return day1.getTime()-day2.getTime(); - } - - public static String toUtc(java.util.Date date){ - DateTime datetime=new DateTime(date, ISOChronology.getInstanceUTC()); - return datetime.toString(); - } - - public static String toUtc(DateTime dateTime){ - return dateTime.toString(); - } - - public static String toUtc(String date){ - DateTime datetime=new DateTime(date, ISOChronology.getInstanceUTC()); - return datetime.toString(); - } - - public static DateTime toUtcDate(String date){ - DateTime datetime=new DateTime(date, ISOChronology.getInstanceUTC()); - return datetime; - } - - public static String toUtcLocal(java.util.Date date){ - DateTime datetime=new DateTime(date,ISOChronology.getInstance()); - return datetime.toString(); - } - - public static String toUtcLocal(String date){ - DateTime datetime=new DateTime(date,ISOChronology.getInstance()); - return datetime.toString(); - } - - - - /** - * Main method for test. - * - * @param args - * @throws EncryptException - */ - public static void main(String[] args) throws Exception { - String stringValue = "20110610090519"; - System.out.println(stringValue); -// System.out.println("Parse \"" + stringValue -// + "\" using format pattern \"" + DateUtils.FORMAT_DATE_DEFAULT -// + "\" with method \"DateUtils.parse()\", result: " -// + DateUtils.parse(stringValue)); -// stringValue = "20080506"; -// System.out.println("Parse \"" + stringValue -// + "\" using method \"DateUtils.tryParse()\", result: " -// + DateUtils.tryParse(stringValue)); -// String s = DateUtils.getExchangeFormat(stringValue,FORMAT_DATE_YYYYMMDDHHMMSS,DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS); -// System.out.print("--->>>"+s); - -// String str = "2011-08-09"; -// System.out.println(UserPasswordUtil.decrypt("PVuyeIHtXnXv5oSPwPUug66w==")); -// System.out.println(DateUtils.getFormtPattern1ToPattern2(str, DateUtils.FORMAT_DATE_YYYY_MM_DD, DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS)); -// str = "aaa\r\nbbb"; -// List list = StringUtil.strToList(str, "\r\n"); -// System.out.println(list.size()); -// System.out.println(StringUtil.listToStr(null, ",")); - -// String value = "a,b,,c,,"; -// System.out.println(value.split("\\,").length); -// System.out.println(StringUtil.removeSplit(value, ",")); - -// Class clazz = TmEmployeeUserInfo.class; -// Field field = clazz.getDeclaredField("spellName"); -// System.out.println(field.getName()); - -// System.out.println(UserPasswordUtil.encrypt("oscwebadmin@163.com")); - //System.out.println(JCEnDecrypt.randomDecrypt("2AF5022B2E78478A9761FD3381BB")); -// System.out.println(JCEnDecrypt.randomEncrypt("aaa")); 41l2Iw4V -// String regEx="[1]{1}[3,5,8,6]{1}[0-9]{9}"; //��ʾa��f -// System.out.println(Pattern.compile(regEx).matcher("18258842633").find()); -// Date lockoutDate = DateUtils.addDate(new Date(), 0, 30, 0); //解锁时间 -// System.out.println(DateUtils.format(lockoutDate, DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS)); - Date date = new Date(); - System.out.println(DateUtils.format(addDate(date, 0, 0, 1, 0, 0, 0),DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS)); - - System.out.println(DateUtils.format(DateUtils.addMinutes(new Date(), Integer.parseInt("2")*1000),DateUtils.FORMAT_DATE_ISO_TIMESTAMP)); - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/EthernetAddress.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/EthernetAddress.java deleted file mode 100644 index 7f651042..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/EthernetAddress.java +++ /dev/null @@ -1,478 +0,0 @@ -package org.maxkey.util; -import java.io.Serializable; -import java.net.NetworkInterface; -import java.security.SecureRandom; -import java.util.Enumeration; -import java.util.Random; - -public class EthernetAddress - implements Serializable, Cloneable, Comparable -{ - private static final long serialVersionUID = 1L; - - private final static char[] HEX_CHARS = "0123456789abcdefABCDEF".toCharArray(); - - /** - * We may need a random number generator, for creating dummy ethernet - * address if no real interface is found. - */ - protected static Random _rnd; - - /** - * 48-bit MAC address, stored in 6 lowest-significant bytes (in - * big endian notation) - */ - protected final long _address; - - /** - * Lazily-constructed String serialization - */ - private volatile String _asString; - - /* - /********************************************************************** - /* Instance construction - /********************************************************************** - */ - - /** - * String constructor; given a 'standard' ethernet MAC address string - * (like '00:C0:F0:3D:5B:7C'), constructs an EthernetAddress instance. - * - * Note that string is case-insensitive, and also that leading zeroes - * may be omitted. Thus '00:C0:F0:3D:5B:7C' and '0:c0:f0:3d:5b:7c' are - * equivalent, and a 'null' address could be passed as ':::::' as well - * as '00:00:00:00:00:00' (or any other intermediate combination). - * - * @param addrStr String representation of the ethernet address - */ - public EthernetAddress(String addrStr) - throws NumberFormatException - { - int len = addrStr.length(); - long addr = 0L; - - /* Ugh. Although the most logical format would be the 17-char one - * (12 hex digits separated by colons), apparently leading zeroes - * can be omitted. Thus... Can't just check string length. :-/ - */ - for (int i = 0, j = 0; j < 6; ++j) { - if (i >= len) { - // Is valid if this would have been the last byte: - if (j == 5) { - addr <<= 8; - break; - } - throw new NumberFormatException("Incomplete ethernet address (missing one or more digits"); - } - - char c = addrStr.charAt(i); - ++i; - int value; - - // The whole number may be omitted (if it was zero): - if (c == ':') { - value = 0; - } else { - // No, got at least one digit? - if (c >= '0' && c <= '9') { - value = (c - '0'); - } else if (c >= 'a' && c <= 'f') { - value = (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - value = (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character '"+c+"'"); - } - - // How about another one? - if (i < len) { - c = addrStr.charAt(i); - ++i; - if (c != ':') { - value = (value << 4); - if (c >= '0' && c <= '9') { - value |= (c - '0'); - } else if (c >= 'a' && c <= 'f') { - value |= (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - value |= (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character '"+c+"'"); - } - } - } - } - - addr = (addr << 8) | value; - - if (c != ':') { - if (i < len) { - if (addrStr.charAt(i) != ':') { - throw new NumberFormatException("Expected ':', got ('"+ addrStr.charAt(i)+"')"); - } - ++i; - } else if (j < 5) { - throw new NumberFormatException("Incomplete ethernet address (missing one or more digits"); - } - } - } - _address = addr; - } - - /** - * Binary constructor that constructs an instance given the 6 byte - * (48-bit) address. Useful if an address is saved in binary format - * (for saving space for example). - */ - public EthernetAddress(byte [] addr) - throws NumberFormatException - { - if (addr.length != 6) { - throw new NumberFormatException("Ethernet address has to consist of 6 bytes"); - } - long l = addr[0] & 0xFF; - for (int i = 1; i < 6; ++i) { - l = (l << 8) | (addr[i] & 0xFF); - } - _address = l; - } - - /** - * Another binary constructor; constructs an instance from the given - * long argument; the lowest 6 bytes contain the address. - * - * @param addr long that contains the MAC address in 6 least significant - * bytes. - */ - public EthernetAddress(long addr) { - _address = addr; - } - - /** - * Default cloning behaviour (bitwise copy) is just fine... - */ - public Object clone() - { - return new EthernetAddress(_address); - } - - /** - * Constructs a new EthernetAddress given the byte array that contains - * binary representation of the address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Binary representation of the ethernet address - * - * @throws NumberFormatException if addr is invalid (less or more than - * 6 bytes in array) - */ - public static EthernetAddress valueOf(byte[] addr) - throws NumberFormatException - { - return new EthernetAddress(addr); - } - - /** - * Constructs a new EthernetAddress given the byte array that contains - * binary representation of the address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Binary representation of the ethernet address - * - * @throws NumberFormatException if addr is invalid (less or more than - * 6 ints in array) - */ - public static EthernetAddress valueOf(int[] addr) - throws NumberFormatException - { - byte[] bAddr = new byte[addr.length]; - - for (int i = 0; i < addr.length; ++i) { - bAddr[i] = (byte) addr[i]; - } - return new EthernetAddress(bAddr); - } - - /** - * Constructs a new EthernetAddress given a string representation of - * the ethernet address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addrStr String representation of the ethernet address - * - * @throws NumberFormatException if addr representation is invalid - */ - public static EthernetAddress valueOf(String addrStr) - throws NumberFormatException - { - return new EthernetAddress(addrStr); - } - - /** - * Constructs a new EthernetAddress given the long int value (64-bit) - * representation of the ethernet address (of which 48 LSB contain - * the definition) - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Long int representation of the ethernet address - */ - public static EthernetAddress valueOf(long addr) - { - return new EthernetAddress(addr); - } - - /** - * Factory method that locates a network interface that has - * a suitable mac address (ethernet cards, and things that - * emulate one), and return that address. If there are multiple - * applicable interfaces, one of them is returned; which one - * is returned is not specified. - * Method is meant for accessing an address needed to construct - * generator for time+location based UUID generation method. - * - * @return Ethernet address of one of interfaces system has; - * not including local or loopback addresses; if one exists, - * null if no such interfaces are found. - */ - public static EthernetAddress fromInterface() - { - try { - Enumeration en = NetworkInterface.getNetworkInterfaces(); - while (en.hasMoreElements()) { - NetworkInterface nint = en.nextElement(); - if (!nint.isLoopback()) { - byte[] data = nint.getHardwareAddress(); - if (data != null && data.length == 6) { - return new EthernetAddress(data); - } - } - } - } catch (java.net.SocketException e) { - // fine, let's take is as signal of not having any interfaces - } - return null; - } - - /** - * Factory method that can be used to construct a random multicast - * address; to be used in cases where there is no "real" ethernet - * address to use. Address to generate should be a multicase address - * to avoid accidental collision with real manufacturer-assigned - * MAC addresses. - *

- * Internally a {@link SecureRandom} instance is used for generating - * random number to base address on. - */ - public static EthernetAddress constructMulticastAddress() - { - return constructMulticastAddress(_randomNumberGenerator()); - } - - /** - * Factory method that can be used to construct a random multicast - * address; to be used in cases where there is no "real" ethernet - * address to use. Address to generate should be a multicase address - * to avoid accidental collision with real manufacturer-assigned - * MAC addresses. - *

- * Address is created using specified random number generator. - */ - public static EthernetAddress constructMulticastAddress(Random rnd) - { - byte[] dummy = new byte[6]; - synchronized (rnd) { - rnd.nextBytes(dummy); - } - /* Need to set the broadcast bit to indicate it's not a real - * address. - */ - /* 20-May-2010, tatu: Actually, we could use both second least-sig-bit - * ("locally administered") or the LSB (multicast), as neither is - * ever set for 'real' addresses. - * Since UUID specs recommends latter, use that. - */ - dummy[0] |= (byte) 0x01; - return new EthernetAddress(dummy); - } - - /* - /********************************************************************** - /* Conversions to raw types - /********************************************************************** - */ - - /** - * Returns 6 byte byte array that contains the binary representation - * of this ethernet address; byte 0 is the most significant byte - * (and so forth) - * - * @return 6 byte byte array that contains the binary representation - */ - public byte[] asByteArray() - { - byte[] result = new byte[6]; - toByteArray(result); - return result; - } - - /** - * Synonym to 'asByteArray()' - * - * @return 6 byte byte array that contains the binary representation - */ - public byte[] toByteArray() { return asByteArray(); } - - public void toByteArray(byte[] array) { - if (array.length < 6) { - throw new IllegalArgumentException("Too small array, need to have space for 6 bytes"); - } - toByteArray(array, 0); - } - - public void toByteArray(byte[] array, int pos) - { - if (pos < 0 || (pos + 6) > array.length) { - throw new IllegalArgumentException("Illegal offset ("+pos+"), need room for 6 bytes"); - } - int i = (int) (_address >> 32); - array[pos++] = (byte) (i >> 8); - array[pos++] = (byte) i; - i = (int) _address; - array[pos++] = (byte) (i >> 24); - array[pos++] = (byte) (i >> 16); - array[pos++] = (byte) (i >> 8); - array[pos] = (byte) i; - } - - public long toLong() { - return _address; - } - - /* - /********************************************************************** - /* Accessors - /********************************************************************** - */ - - /** - * Method that can be used to check if this address refers - * to a multicast address. - * Such addresses are never assigned to individual network - * cards. - */ - public boolean isMulticastAddress() { - return (((int) (_address >> 40)) & 0x01) != 0; - } - - /** - * Method that can be used to check if this address refers - * to a "locally administered address" - * (see [http://en.wikipedia.org/wiki/MAC_address] for details). - * Such addresses are not assigned to individual network - * cards. - */ - public boolean isLocallyAdministeredAddress() { - return (((int) (_address >> 40)) & 0x02) != 0; - } - - /* - /********************************************************************** - /* Standard methods - /********************************************************************** - */ - - @Override - public boolean equals(Object o) - { - if (o == this) return true; - if (o == null) return false; - if (o.getClass() != getClass()) return false; - return ((EthernetAddress) o)._address == _address; - } - - /** - * Method that compares this EthernetAddress to one passed in as - * argument. Comparison is done simply by comparing individual - * address bytes in the order. - * - * @return negative number if this EthernetAddress should be sorted before the - * parameter address if they are equal, os positive non-zero number if this address - * should be sorted after parameter - */ - public int compareTo(EthernetAddress other) - { - long l = _address - other._address; - if (l < 0L) return -1; - return (l == 0L) ? 0 : 1; - } - - /** - * Returns the canonical string representation of this ethernet address. - * Canonical means that all characters are lower-case and string length - * is always 17 characters (ie. leading zeroes are not omitted). - * - * @return Canonical string representation of this ethernet address. - */ - @Override - public String toString() - { - String str = _asString; - if (str != null) { - return str; - } - - /* Let's not cache the output here (unlike with UUID), assuming - * this won't be called as often: - */ - StringBuilder b = new StringBuilder(17); - int i1 = (int) (_address >> 32); - int i2 = (int) _address; - - _appendHex(b, i1 >> 8); - b.append(':'); - _appendHex(b, i1); - b.append(':'); - _appendHex(b, i2 >> 24); - b.append(':'); - _appendHex(b, i2 >> 16); - b.append(':'); - _appendHex(b, i2 >> 8); - b.append(':'); - _appendHex(b, i2); - _asString = str = b.toString(); - return str; - } - - /* - /********************************************************************** - /* Internal methods - /********************************************************************** - */ - - /** - * Helper method for accessing configured random number generator - */ - protected synchronized static Random _randomNumberGenerator() - { - if (_rnd == null) { - _rnd = new SecureRandom(); - } - return _rnd; - } - - private final void _appendHex(StringBuilder sb, int hex) - { - sb.append(HEX_CHARS[(hex >> 4) & 0xF]); - sb.append(HEX_CHARS[(hex & 0x0f)]); - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/JsonUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/JsonUtils.java deleted file mode 100644 index 4ef19fbf..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/JsonUtils.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.maxkey.util; - -import java.io.IOException; - -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; - - -public class JsonUtils { - - /** - * Transform json string to java bean object - * @param json - * @param bean - * @return Object - */ - @SuppressWarnings("finally") - public static Object json2Object(String json,Object bean){ - try { - bean=(new ObjectMapper()).readValue(json, bean.getClass()); - } catch (JsonParseException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - }finally{ - return bean; - } - } - - /** - * Transform json string to java bean object - * @param json - * @param Class - * @return Object - */ - @SuppressWarnings("finally") - public static T json2Object(String json,Class cls){ - T bean =null; - try { - bean=(new ObjectMapper()).readValue(json, cls); - } catch (JsonParseException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - }finally{ - return bean; - } - } - - /** - * Transform java bean object to json string - * @param bean - * @return string - */ - @SuppressWarnings("finally") - public static String object2Json(Object bean){ - String json=""; - try { - json= (new ObjectMapper()).writeValueAsString(bean); - } catch (JsonGenerationException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - }finally{ - return json; - } - } - - /** - * prettyJson use jackson - * @param bean - * @return String - */ - public static String pretty(Object bean){ - String prettyJson=""; - try { - prettyJson= (new ObjectMapper()).writerWithDefaultPrettyPrinter().writeValueAsString(bean); - } catch (JsonGenerationException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - return prettyJson; - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtils.java deleted file mode 100644 index b0f99385..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtils.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.maxkey.util; - -import java.io.UnsupportedEncodingException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class PathUtils { - private final Logger _logger = LoggerFactory.getLogger(getClass()); - private static PathUtils instance = null; - private String classPath; - - public static synchronized PathUtils getInstance() { - if (instance == null) { - instance = new PathUtils(); - instance._logger.debug("getInstance()" +" new ConfigFile instance"); - } - return instance; - } - - public PathUtils() { - try { - classPath = java.net.URLDecoder.decode(PathUtils.class.getResource("PathUtilsFile.properties").getFile(),"UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - String fileProtocol=PathUtils.class.getResource("PathUtilsFile.properties").getProtocol(); - _logger.info("getWebRoot getProtocol:"+PathUtils.class.getResource("PathUtilsFile.properties").getProtocol()); - if(fileProtocol.equalsIgnoreCase("file")){ - // /D:/SoftWare/apache-tomcat-5.5.30/webapps/JqWeb - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(fileProtocol.equalsIgnoreCase("jar")){ - // file:/D:/SoftWare/apache-tomcat-5.5.30/webapps/JqWeb - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(fileProtocol.equalsIgnoreCase("wsjar")){ - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(classPath.equalsIgnoreCase("file:")){ - classPath=classPath.substring(5, classPath.length()); - } - - /// /WEB-INF/ - if(classPath.indexOf("/WEB-INF/")!=-1){ - classPath=classPath.substring(0, classPath.indexOf("/WEB-INF/")); - } - - _logger.info("getWebRoot() webApp root Path : "+classPath); - } - - public String getClassPath(){ - return classPath+"/WEB-INF/classes/"; - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtilsFile.properties b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtilsFile.properties deleted file mode 100644 index 6a2b0ac4..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/PathUtilsFile.properties +++ /dev/null @@ -1 +0,0 @@ -v1.0.1 \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringGenerator.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringGenerator.java deleted file mode 100644 index 03c47c2b..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringGenerator.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.maxkey.util; - -import java.security.SecureRandom; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Random; - -import org.maxkey.crypto.Base64Utils; - -public class StringGenerator { - - private static final char[] DEFAULT_CODEC = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - .toCharArray(); - - private Random random = new SecureRandom(); - - private int length; - - /** - * Create a generator with the default length (6). - */ - public StringGenerator() { - this(6); - } - - /** - * Create a generator of random strings of the length provided - * - * @param length the length of the strings generated - */ - public StringGenerator(int length) { - this.length = length; - } - - public String randomGenerate() { - byte[] verifierBytes = new byte[length]; - random.nextBytes(verifierBytes); - return getString(verifierBytes); - } - - public String uuidGenerate() { - UUIDGenerator generated=new UUIDGenerator(); - return generated.toString().replace("-", "").toLowerCase(); - } - - public String uniqueGenerate() { - StringBuffer uniqueString=new StringBuffer(""); - this.length=9; - String randomString =randomGenerate(); - uniqueString.append(randomString.subSequence(0, 4)); - - Date currentDate=new Date(); - DateFormat dateFormat = new SimpleDateFormat("ddMMSSSyyyyHHmmss"); - String dateString=Base64Utils.encodeBase64(dateFormat.format(currentDate).getBytes()); - dateString=dateString.substring(0, dateString.length()-1); - uniqueString.append(dateString); - - uniqueString.append(randomString.subSequence(5, 8)); - - return uniqueString.toString(); - } - - /** - * Convert these random bytes to a verifier string. The length of the byte array can be - * {@link #setLength(int) configured}. The default implementation mods the bytes to fit into the - * ASCII letters 1-9, A-Z, a-z . - * - * @param verifierBytes The bytes. - * @return The string. - */ - protected String getString(byte[] verifierBytes) { - char[] chars = new char[verifierBytes.length]; - for (int i = 0; i < verifierBytes.length; i++) { - chars[i] = DEFAULT_CODEC[((verifierBytes[i] & 0xFF) % DEFAULT_CODEC.length)]; - } - return new String(chars); - } - - /** - * The random value generator used to create token secrets. - * - * @param random The random value generator used to create token secrets. - */ - public void setRandom(Random random) { - this.random = random; - } - - /** - * The length of string to generate. - * - * @param length the length to set - */ - public void setLength(int length) { - this.length = length; - } - - public static void main(String[] args) { - StringGenerator stringGenerator=new StringGenerator(); - System.out.println(stringGenerator.uuidGenerate()); - System.out.println(stringGenerator.uuidGenerate().length()); - System.out.println(stringGenerator.uniqueGenerate()); - System.out.println(stringGenerator.uniqueGenerate().length()); - - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringUtils.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringUtils.java deleted file mode 100644 index 9a57daeb..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/StringUtils.java +++ /dev/null @@ -1,443 +0,0 @@ -package org.maxkey.util; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -public final class StringUtils { - - /** - * avoid null, and return value trim. - * @param value string value. - * @return the trim of value. - */ - public static String avoidNull(String value) { - return (value == null) ? "" : value.trim(); - } - - public static boolean isNull(String value) { - return value == null; - } - - /** - * @param value string - * value - * @return value - */ - public static boolean isNullOrBlank(String value) { - return value == null || "".equals(value.trim()); - } - - public static boolean isNotEmpty(String value) { - return !isNullOrBlank(value); - } - - public static boolean isNotNullAndEquals(String value,String equalString) { - return !isNullOrBlank(value)&&value.equals(equalString); - } - - public static boolean isNotNullAndEqualsIgnoreCase(String value,String equalString) { - return !isNullOrBlank(value)&&value.equalsIgnoreCase(equalString); - } - - /* - * 获取指定UTF-8模式字节长度的字符串 - */ - public static String limitLength(String strValue, int bytelen){ - - //中文汉字占用三个字节 - int strlen = bytelen/3; - int real_bytelen = strlen*3; - - //如果为NULL或�?空,则直接返�? - if(null==strValue || "".equalsIgnoreCase(strValue)){ - return ""; - } - - try{ - byte[] utf8_bytes = strValue.getBytes("UTF-8"); - if(utf8_bytes.length<=bytelen) return strValue; - - byte[] cutoff_bytes = new byte[real_bytelen]; - System.arraycopy(utf8_bytes, 0, cutoff_bytes, 0, real_bytelen); - - String strResult = new String(cutoff_bytes, "UTF-8"); - - return strResult; - - }catch(Exception e){ - if(strValue.length() string2List(String string, String split) { - String[] strs = {}; - if (string != null && !string.equals("")) { - strs = string.split(split); - } - ArrayList resultList = new ArrayList(0); - for (int i = 0; i < strs.length; i++) { - if (strs[i] != null&& !strs[i].equals("")) { - resultList.add(strs[i]); - } - } - resultList.trimToSize(); - return resultList; - } - - public static String list2String(List list, String split) { - String string = ""; - if (list == null) - return string; - for (int i = 0; i < list.size(); i++) { - if (list.get(i) != null && !list.get(i).equals("")) { - string += list.get(i) + split; - } - } - if (string.length() > 0) { - string = string.substring(0, string.length() - 1); - } - return string; - } - - - public static int parse2Integer(String string) { - Integer value = 0; - try { - value = Integer.parseInt(string); - } catch(Exception e){ - throw new RuntimeException("parse "+string+" to Integer error."); - } - return value; - } - - - /** - * 处理如id=name形式的字符串 - * @param proValue - * @param key - * @param value - * @return - */ - public static Map> processStr(String proValue,String key,String value) { - Map> map = new HashMap>(); - List idList = new ArrayList(); - List nameList = new ArrayList(); - if(StringUtils.isNotEmpty(proValue)) { - List list = StringUtils.string2List(proValue, ","); - for(String str : list) { - idList.add(str.split("\\,")[0]); - nameList.add(str.split("\\,")[1]); - } - } - map.put(key, idList); - map.put(value, nameList); - return map; - } - - /** - * 获得集合对象中某�?��性字段的值,中间用split隔开 - * @param list 集合对象 - * @param propName 属�?名称 - * @param split 分隔�? - * @return - */ - @SuppressWarnings("rawtypes") - public static String convertPropVal(List list,String propName,String split) { - String retVal = ""; - for(Object obj : list) { - if(StringUtils.isNotEmpty(retVal)) { - retVal += split; - } - retVal += BeanUtil.getValue(obj, propName); - } - return retVal; - } - - /** - * 将对象类型的集合转换为String类型的集�? - * @param list - * @param propName - * @return - */ - @SuppressWarnings("rawtypes") - public static List convertList(List list, String propName) { - List strList = new ArrayList(); - for(Object obj : list) { - strList.add(BeanUtil.getValue(obj, propName)); - } - return strList; - } - - /** - * 将对象类型的集合转换为String类型的Map集合 - * @param list - * @param propNames - * @return - */ - @SuppressWarnings("rawtypes") - public static Map> convertListToMap(List list, String ... propNames) { - Map> map = new HashMap>(); - for(String name : propNames) { - List strList = new ArrayList(); - for(Object obj : list) { - strList.add(BeanUtil.getValue(obj, name)); - } - map.put(name, strList); - } - return map; - } - - public static String convertWeekStr(String str,String split) { - String retVal = ""; - try { - if(StringUtils.isNotEmpty(str)) { - String []array = str.split("\\"+split); - for(int i = 0; i < array.length; i++) { - if(StringUtils.isNotEmpty(retVal)) { - retVal += split; - } - retVal += (Integer.parseInt(array[i]) + 1); - } - } - } catch(NumberFormatException e) { - e.printStackTrace(); - } - return retVal; - } - - - public static List convertToSingleList(List list){ - return convertToSingleList(list,","); - } - - public static List convertToSingleList(List list,String reg){ - List result = new ArrayList(); - if(list!=null && list.size()>0){ - for(String str:list){ - String[] arrStr = str.split(reg); - for(int i=0;i aduserName2Map(String aduserName) { - if(isNullOrBlank(aduserName)) { - return null; - } - Map map = new HashMap(); - int index = 0; - if((index = aduserName.indexOf("\\")) > 0) { - map.put("domain", aduserName.substring(0,index)); - map.put("userName", aduserName.substring(index + 1, aduserName.length())); - } else if((index = aduserName.indexOf("@")) > 0) { - map.put("userName", aduserName.substring(0, index)); - map.put("domain", aduserName.substring(index + 1)); - } else { - map.put("userName", aduserName); - } - return map; - } - - - /** - * 处理AD域中的用户名,将域名去掉 - * @param str - * @return - */ - public static String takeoffDomain(String aduserName) { - Map map = aduserName2Map(aduserName); - if(BeanUtil.isNotNull(map)) { - return map.get("userName"); - } - return null; - } - - public static String getAdDomin(String aduserName) { - Map map = aduserName2Map(aduserName); - if(BeanUtil.isNotNull(map)) { - return map.get("domain"); - } - return null; - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/UUIDGenerator.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/UUIDGenerator.java deleted file mode 100644 index bcd0ff06..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/util/UUIDGenerator.java +++ /dev/null @@ -1,371 +0,0 @@ -package org.maxkey.util; - -import java.lang.management.ManagementFactory; -import java.security.MessageDigest; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.Date; -import java.util.Random; -import java.util.TimeZone; -import java.util.concurrent.atomic.AtomicInteger; - - -/** - * See README.md for more information - */ -public final class UUIDGenerator { - public static final int PID = processId(); - public static final byte[] MAC = macAddress(); - - private static final int MAX_PID = 65536; - private static final int INCREMENT = 198491317; - private static final char VERSION = 'b'; - private static final int VERSION_DEC = mapToByte(VERSION, '0'); - private static final AtomicInteger COUNTER = new AtomicInteger(new Random(System.nanoTime()).nextInt()); - private static final char[] HEX = - {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; - - private static boolean sequential = false; - private final byte[] content; - - /** - * Constructor that generates a new UUID using the current process id, MAC address, and timestamp - */ - public UUIDGenerator() { - long time = new Date().getTime(); - content = new byte[16]; - - if (!sequential) { - // atomically add a large prime number to the count and get the previous value - int count = COUNTER.addAndGet(INCREMENT); - - // switch the order of the count in 4 bit segments and place into content - content[0] = (byte) (((count & 0xF) << 4) | ((count & 0xF0) >> 4)); - content[1] = (byte) (((count & 0xF00) >> 4) | ((count & 0xF000) >> 12)); - content[2] = (byte) (((count & 0xF0000) >> 12) | ((count & 0xF00000) >> 20)); - content[3] = (byte) (((count & 0xF000000) >> 20) | ((count & 0xF0000000) >> 28)); - } - else { - int count = COUNTER.addAndGet(1); - - // get the count in order and place into content - content[0] = (byte) (count >> 24); - content[1] = (byte) (count >> 16); - content[2] = (byte) (count >> 8); - content[3] = (byte) (count); - } - - // copy pid to content - content[4] = (byte) (PID >> 8); - content[5] = (byte) (PID); - - // place UUID version (hex 'b') in first four bits and piece of mac address in - // the second four bits - content[6] = (byte) (VERSION_DEC | (0xF & MAC[2])); - - // copy rest of mac address into content - content[7] = MAC[3]; - content[8] = MAC[4]; - content[9] = MAC[5]; - - // copy timestamp into content - content[10] = (byte) (time >> 40); - content[11] = (byte) (time >> 32); - content[12] = (byte) (time >> 24); - content[13] = (byte) (time >> 16); - content[14] = (byte) (time >> 8); - content[15] = (byte) (time); - } - - /** - * Constructor that takes a byte array as this UUID's content - * @param bytes UUID content - */ - public UUIDGenerator(byte[] bytes) { - if (bytes.length != 16) - throw new RuntimeException("Attempted to parse malformed UUID: " + Arrays.toString(bytes)); - - content = Arrays.copyOf(bytes, 16); - } - - public UUIDGenerator(String id) { - id = id.trim(); - - if (id.length() != 36) - throw new RuntimeException("Attempted to parse malformed UUID: " + id); - - content = new byte[16]; - char[] chars = id.toCharArray(); - - content[0] = mapToByte(chars[0], chars[1]); - content[1] = mapToByte(chars[2], chars[3]); - content[2] = mapToByte(chars[4], chars[5]); - content[3] = mapToByte(chars[6], chars[7]); - content[4] = mapToByte(chars[9], chars[10]); - content[5] = mapToByte(chars[11], chars[12]); - content[6] = mapToByte(chars[14], chars[15]); - content[7] = mapToByte(chars[16], chars[17]); - content[8] = mapToByte(chars[19], chars[20]); - content[9] = mapToByte(chars[21], chars[22]); - content[10] = mapToByte(chars[24], chars[25]); - content[11] = mapToByte(chars[26], chars[27]); - content[12] = mapToByte(chars[28], chars[29]); - content[13] = mapToByte(chars[30], chars[31]); - content[14] = mapToByte(chars[32], chars[33]); - content[15] = mapToByte(chars[34], chars[35]); - } - - /** - * Toggle uuid generator into sequential mode, so the random segment is in order and increases by one - */ - public static void useSequentialIds() { - if (!sequential) { - // get string that changes every 10 minutes - TimeZone tz = TimeZone.getTimeZone("UTC"); - DateFormat df = new SimpleDateFormat("yyyyMMddHHmm"); - df.setTimeZone(tz); - String date = df.format(new Date()).substring(0, 11); - - // run an md5 hash of the string, no reason this needs to be secure - byte[] digest; - try { - MessageDigest md = MessageDigest.getInstance("MD5"); - digest = md.digest(date.getBytes("UTF-8")); - } - catch (Exception e) { - throw new RuntimeException("Could not create hash of date for the sequential counter", e); - } - - // create integer from first 4 bytes of md5 hash - int x; - x = ((int)digest[0] & 0xFF); - x |= ((int)digest[1] & 0xFF) << 8; - x |= ((int)digest[2] & 0xFF) << 16; - x |= ((int)digest[3] & 0xFF) << 24; - - COUNTER.set(x); - } - sequential = true; - } - - /** - * Toggle uuid generator into variable mode, so the random segment is in reverse order and - * increases by a large increment. This is the default mode. - */ - public static void useVariableIds() { - sequential = false; - } - - /** - * map hex character to 4 bit number - * @param x hex character - * @return four bit number representing offset from '0' - */ - private static int intValue(char x) { - if (x >= '0' && x <= '9') - return x - '0'; - if (x >= 'a' && x <= 'f') - return x - 'a' + 10; - if (x >= 'A' && x <= 'F') - return x - 'A' + 10; - throw new RuntimeException("Error parsing UUID at character: " + x); - } - - /** - * map two hex characters to 4 bit numbers and combine them - * @param a hex character 1 - * @param b hex character 2 - * @return single byte value of combined characters - */ - private static byte mapToByte(char a, char b) { - int ai = intValue(a); - int bi = intValue(b); - return (byte) ((ai << 4) | bi); - } - - /** - * copy the content of this UUID, so that it can't be changed, and return it - * @return raw byte array of UUID - */ - public byte[] getBytes() { - return Arrays.copyOf(content, 16); - } - - @Override - public String toString() { - char[] id = new char[36]; - - // split each byte into 4 bit numbers and map to hex characters - id[0] = HEX[(content[0] & 0xF0) >> 4]; - id[1] = HEX[(content[0] & 0x0F)]; - id[2] = HEX[(content[1] & 0xF0) >> 4]; - id[3] = HEX[(content[1] & 0x0F)]; - id[4] = HEX[(content[2] & 0xF0) >> 4]; - id[5] = HEX[(content[2] & 0x0F)]; - id[6] = HEX[(content[3] & 0xF0) >> 4]; - id[7] = HEX[(content[3] & 0x0F)]; - id[8] = '-'; - id[9] = HEX[(content[4] & 0xF0) >> 4]; - id[10] = HEX[(content[4] & 0x0F)]; - id[11] = HEX[(content[5] & 0xF0) >> 4]; - id[12] = HEX[(content[5] & 0x0F)]; - id[13] = '-'; - id[14] = HEX[(content[6] & 0xF0) >> 4]; - id[15] = HEX[(content[6] & 0x0F)]; - id[16] = HEX[(content[7] & 0xF0) >> 4]; - id[17] = HEX[(content[7] & 0x0F)]; - id[18] = '-'; - id[19] = HEX[(content[8] & 0xF0) >> 4]; - id[20] = HEX[(content[8] & 0x0F)]; - id[21] = HEX[(content[9] & 0xF0) >> 4]; - id[22] = HEX[(content[9] & 0x0F)]; - id[23] = '-'; - id[24] = HEX[(content[10] & 0xF0) >> 4]; - id[25] = HEX[(content[10] & 0x0F)]; - id[26] = HEX[(content[11] & 0xF0) >> 4]; - id[27] = HEX[(content[11] & 0x0F)]; - id[28] = HEX[(content[12] & 0xF0) >> 4]; - id[29] = HEX[(content[12] & 0x0F)]; - id[30] = HEX[(content[13] & 0xF0) >> 4]; - id[31] = HEX[(content[13] & 0x0F)]; - id[32] = HEX[(content[14] & 0xF0) >> 4]; - id[33] = HEX[(content[14] & 0x0F)]; - id[34] = HEX[(content[15] & 0xF0) >> 4]; - id[35] = HEX[(content[15] & 0x0F)]; - - return new String(id); - } - - /** - * extract version field as a hex char from raw UUID bytes - * @return version char - */ - public char getVersion() { - return HEX[(content[6] & 0xF0) >> 4]; - } - - /** - * extract process id from raw UUID bytes and return as int - * @return id of process that generated the UUID, or -1 for unrecognized format - */ - public int getProcessId() { - if (getVersion() != VERSION) - return -1; - - return ((content[4] & 0xFF) << 8) | (content[5] & 0xFF); - } - - /** - * extract timestamp from raw UUID bytes and return as int - * @return millisecond UTC timestamp from generation of the UUID, or null for unrecognized format - */ - public Date getTimestamp() { - if (getVersion() != VERSION) - return null; - - long time; - time = ((long)content[10] & 0xFF) << 40; - time |= ((long)content[11] & 0xFF) << 32; - time |= ((long)content[12] & 0xFF) << 24; - time |= ((long)content[13] & 0xFF) << 16; - time |= ((long)content[14] & 0xFF) << 8; - time |= ((long)content[15] & 0xFF); - return new Date(time); - } - - /** - * extract MAC address fragment from raw UUID bytes, setting missing values to 0, - * thus the first 2 and a half bytes will be 0, followed by 3 and a half bytes - * of the active MAC address when the UUID was generated - * @return byte array of UUID fragment, or null for unrecognized format - */ - public byte[] getMacFragment() { - if (getVersion() != 'b') - return null; - - byte[] x = new byte[6]; - - x[0] = 0; - x[1] = 0; - x[2] = (byte) (content[6] & 0xF); - x[3] = content[7]; - x[4] = content[8]; - x[5] = content[9]; - - return x; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - UUIDGenerator that = (UUIDGenerator) o; - - if (this.content.length != that.content.length) - return false; - - for (int i = 0; i < this.content.length; i++) - if (this.content[i] != that.content[i]) - return false; - - return true; - } - - @Override - public int hashCode() { - return Arrays.hashCode(content); - } - - private static byte[] macAddress() { - try { - //old - //byte[] mac = NetworkInterface.getNetworkInterfaces().nextElement().getHardwareAddress(); - byte[] mac = EthernetAddress.fromInterface().toByteArray(); - // if the machine is not connected to a network it has no active MAC address - if (mac == null) - mac = new byte[] {0, 0, 0, 0, 0, 0}; - - return mac; - } catch (Exception e) { - throw new RuntimeException("Could not get MAC address"); - } - } - - // pulled from http://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id - private static int processId() { - // Note: may fail in some JVM implementations - // something like '@', at least in SUN / Oracle JVMs - final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); - final int index = jvmName.indexOf('@'); - - if (index < 1) - throw new RuntimeException("Could not get PID"); - - try { - return Integer.parseInt(jvmName.substring(0, index)) % MAX_PID; - } catch (NumberFormatException e) { - throw new RuntimeException("Could not get PID"); - } - } - - public static void main(String[] args) { - UUIDGenerator generated=new UUIDGenerator(); - System.out.println(generated.toString()); - - version(generated); - } - - public static void version(org.maxkey.util.UUIDGenerator generated){ - System.out.println("UUID : " + generated.toString()); - System.out.println("raw bytes : " + Arrays.toString(generated.getBytes())); - System.out.println("process id : " + generated.getProcessId()); - System.out.println("MAC fragment : " + Arrays.toString(generated.getMacFragment())); - System.out.println("timestamp : " + generated.getTimestamp()); - System.out.println("UUID version : " + generated.getVersion()); - - UUIDGenerator copy = new UUIDGenerator(generated.toString()); - System.out.println("copied : " + generated.equals(copy)); - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosConfig.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosConfig.java deleted file mode 100644 index cfe46f11..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosConfig.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.maxkey.web; - -public class KerberosConfig { - String keyTabLocation; - String krbConfLocation; - String servicePrincipal; - boolean debug; - - - /** - * - */ - public KerberosConfig() { - // TODO Auto-generated constructor stub - } - - public String getKeyTabLocation() { - return keyTabLocation; - } - public void setKeyTabLocation(String keyTabLocation) { - this.keyTabLocation = keyTabLocation; - } - public String getKrbConfLocation() { - return krbConfLocation; - } - public void setKrbConfLocation(String krbConfLocation) { - this.krbConfLocation = krbConfLocation; - } - public String getServicePrincipal() { - return servicePrincipal; - } - public void setServicePrincipal(String servicePrincipal) { - this.servicePrincipal = servicePrincipal; - } - public boolean isDebug() { - return debug; - } - public void setDebug(boolean debug) { - this.debug = debug; - } - - @Override - public String toString() { - return "KerberosConfig [keyTabLocation=" + keyTabLocation - + ", krbConfLocation=" + krbConfLocation - + ", servicePrincipal=" + servicePrincipal + ", debug=" + debug - + "]"; - } - -} - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosToken.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosToken.java deleted file mode 100644 index fcdf99b5..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosToken.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.maxkey.web; - -public class KerberosToken { - - String principal; - String fullPrincipal; - String notOnOrAfter; - String userDomain; - - /** - * - */ - public KerberosToken() { - // TODO Auto-generated constructor stub - } - - public String getPrincipal() { - return principal; - } - - public void setPrincipal(String principal) { - this.principal = principal; - } - - public String getFullPrincipal() { - return fullPrincipal; - } - - public void setFullPrincipal(String fullPrincipal) { - this.fullPrincipal = fullPrincipal; - } - - public String getNotOnOrAfter() { - return notOnOrAfter; - } - - public void setNotOnOrAfter(String notOnOrAfter) { - this.notOnOrAfter = notOnOrAfter; - } - - public String getUserDomain() { - return userDomain; - } - - public void setUserDomain(String userDomain) { - this.userDomain = userDomain; - } - - @Override - public String toString() { - return "KerberosToken [principal=" + principal + ", fullPrincipal=" - + fullPrincipal + ", notOnOrAfter=" + notOnOrAfter - + ", userDomain=" + userDomain + "]"; - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosTokenConfig.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosTokenConfig.java deleted file mode 100644 index bec437af..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/KerberosTokenConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.maxkey.web; - -public class KerberosTokenConfig { - boolean diagnose; - String tokenPostLocation; - Integer validity; - String userDomain; - String crypto; - - - /** - * - */ - public KerberosTokenConfig() { - // TODO Auto-generated constructor stub - } - public boolean isDiagnose() { - return diagnose; - } - public void setDiagnose(boolean diagnose) { - this.diagnose = diagnose; - } - public String getTokenPostLocation() { - return tokenPostLocation; - } - public void setTokenPostLocation(String tokenPostLocation) { - this.tokenPostLocation = tokenPostLocation; - } - public Integer getValidity() { - return validity; - } - public void setValidity(Integer validity) { - this.validity = validity; - } - public String getUserDomain() { - return userDomain; - } - public void setUserDomain(String userDomain) { - this.userDomain = userDomain; - } - public String getCrypto() { - return crypto; - } - public void setCrypto(String crypto) { - this.crypto = crypto; - } - @Override - public String toString() { - return "KerberosTokenConfig [diagnose=" + diagnose - + ", tokenPostLocation=" + tokenPostLocation + ", validity=" - + validity + ", userDomain=" + userDomain + ", crypto=" - + crypto + "]"; - } - -} - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/contorller/KerberosController.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/contorller/KerberosController.java deleted file mode 100644 index f10a97f3..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/maxkey/web/contorller/KerberosController.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.maxkey.web.contorller; - -import java.util.Date; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.joda.time.DateTime; -import org.joda.time.chrono.ISOChronology; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.util.DateUtils; -import org.maxkey.util.JsonUtils; -import org.maxkey.web.KerberosToken; -import org.maxkey.web.KerberosTokenConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - - - -/** - * @author Crystal.Sea - * - */ - -@Controller -public class KerberosController { - private static Logger _logger = LoggerFactory.getLogger(KerberosController.class); - - @Autowired - @Qualifier("kerberosTokenConfig") - private KerberosTokenConfig kerberosTokenConfig; - - /** - * this is Kerberos Logined Controller - * @param request - * @param response - * @return ModelAndView - */ - @RequestMapping(value={"/authn"}) - public ModelAndView authn(HttpServletRequest request,HttpServletResponse response) { - _logger.debug("kerberos /authn."); - ModelAndView modelAndView = new ModelAndView(); - String kerberosPrincipal=request.getRemoteUser(); - _logger.debug("kerberos Principal is "+kerberosPrincipal); - - if(kerberosPrincipal==null){ - modelAndView.setViewName("error"); - modelAndView.addObject("errorMessage", "kerberos Principal is null ."); - return modelAndView; - }else{ - String shortPrincipal=kerberosPrincipal; - if(kerberosPrincipal.indexOf("@")>-1){ - shortPrincipal=kerberosPrincipal.substring(0, kerberosPrincipal.indexOf("@")); - } - - _logger.debug("kerberos Short Principal is "+shortPrincipal); - - /** - * get current date time , - * then plus token validity Minutes, - * this is token expired time - */ - DateTime datetime=new DateTime(new Date(), ISOChronology.getInstanceUTC()); - datetime=datetime.plusMinutes(kerberosTokenConfig.getValidity()); - - /** - * build Kerberos Token - * include parameter - * Principal - * FullPrincipal - * NotOnOrAfter - * UserDomain - */ - KerberosToken kerberosToken=new KerberosToken(); - kerberosToken.setFullPrincipal(kerberosPrincipal); - kerberosToken.setPrincipal(shortPrincipal); - kerberosToken.setNotOnOrAfter(DateUtils.toUtc(datetime)); - kerberosToken.setUserDomain(kerberosTokenConfig.getUserDomain()); - - /** - * transform kerberosToken to json format - */ - String kerberosTokenString=JsonUtils.object2Json(kerberosToken); - - _logger.debug("kerberosToken json : \n"+kerberosTokenString); - - /** - * encrypted KerberosToken use AES Algorithm , - * then to HEX - */ - String encryptedKerberosTokenString=ReciprocalUtils.aesEncode(kerberosTokenString, kerberosTokenConfig.getCrypto()); - - _logger.debug("kerberosToken json encrypted : \n"+encryptedKerberosTokenString); - - modelAndView.addObject("kerberosPrincipal", kerberosPrincipal); - modelAndView.addObject("shortPrincipal", shortPrincipal); - modelAndView.addObject("kerberosToken", kerberosTokenString); - modelAndView.addObject("encryptedKerberosToken", encryptedKerberosTokenString); - modelAndView.addObject("kerberosUserDomain", kerberosTokenConfig.getUserDomain()); - modelAndView.addObject("tokenPostLocation", kerberosTokenConfig.getTokenPostLocation()); - } - - _logger.debug("Diagnose View : "+kerberosTokenConfig.isDiagnose()); - - if(kerberosTokenConfig.isDiagnose()){ - /** - * forward to kerberos_diagnose.jsp, - * then show details - */ - modelAndView.setViewName("kerberos_diagnose"); - }else{ - /** - * forward to kerberos.jsp, - * then post to ConnSec Access login URI - */ - modelAndView.setViewName("kerberos"); - } - return modelAndView; - } - - public void setKerberosTokenConfig(KerberosTokenConfig kerberosTokenConfig) { - this.kerberosTokenConfig = kerberosTokenConfig; - } -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosAuthenticationProvider.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosAuthenticationProvider.java deleted file mode 100644 index 440f6eeb..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosAuthenticationProvider.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication; - -import org.springframework.security.authentication.AuthenticationProvider; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; - -/** - * {@link AuthenticationProvider} for kerberos. - * - * @author Mike Wiesner - * @since 1.0 - */ -public class KerberosAuthenticationProvider implements AuthenticationProvider { - - private KerberosClient kerberosClient; - - private UserDetailsService userDetailsService; - - @Override - public Authentication authenticate(Authentication authentication) throws AuthenticationException { - UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication; - String validatedUsername = kerberosClient.login(auth.getName(), auth.getCredentials().toString()); - UserDetails userDetails = this.userDetailsService.loadUserByUsername(validatedUsername); - UsernamePasswordAuthenticationToken output = new UsernamePasswordAuthenticationToken(userDetails, - auth.getCredentials(), userDetails.getAuthorities()); - output.setDetails(authentication.getDetails()); - return output; - - } - - @Override - public boolean supports(Class authentication) { - return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); - } - - /** - * Sets the kerberos client. - * - * @param kerberosClient the new kerberos client - */ - public void setKerberosClient(KerberosClient kerberosClient) { - this.kerberosClient = kerberosClient; - } - - /** - * Sets the user details service. - * - * @param detailsService the new user details service - */ - public void setUserDetailsService(UserDetailsService detailsService) { - this.userDetailsService = detailsService; - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosClient.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosClient.java deleted file mode 100644 index 27aa5388..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2009 the original author or authors. - * - * Licensed 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. - */ - -package org.springframework.security.kerberos.authentication; - -/** - * - * @author Mike Wiesner - * @since 1.0 - * @version $Id$ - */ -public interface KerberosClient { - - public String login(String username, String password); - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceAuthenticationProvider.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceAuthenticationProvider.java deleted file mode 100644 index 8283f0c4..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceAuthenticationProvider.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.security.authentication.AccountStatusUserDetailsChecker; -import org.springframework.security.authentication.AuthenticationProvider; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsChecker; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.util.Assert; - -/** - *

Authentication Provider which validates Kerberos Service Tickets - * or SPNEGO Tokens (which includes Kerberos Service Tickets).

- * - *

It needs a KerberosTicketValidator, which contains the - * code to validate the ticket, as this code is different between - * SUN and IBM JRE.
- * It also needs an UserDetailsService to load the user properties - * and the GrantedAuthorities, as we only get back the username - * from Kerbeos

- * - * You can see an example configuration in SpnegoAuthenticationProcessingFilter. - * - * @author Mike Wiesner - * @author Jeremy Stone - * @since 1.0 - * @see KerberosTicketValidator - * @see UserDetailsService - */ -public class KerberosServiceAuthenticationProvider implements - AuthenticationProvider, InitializingBean { - - private static final Log LOG = LogFactory.getLog(KerberosServiceAuthenticationProvider.class); - - private KerberosTicketValidator ticketValidator; - private UserDetailsService userDetailsService; - private UserDetailsChecker userDetailsChecker = new AccountStatusUserDetailsChecker(); - - @Override - public Authentication authenticate(Authentication authentication) - throws AuthenticationException { - KerberosServiceRequestToken auth = (KerberosServiceRequestToken) authentication; - byte[] token = auth.getToken(); - LOG.debug("Try to validate Kerberos Token"); - KerberosTicketValidation ticketValidation = this.ticketValidator.validateTicket(token); - LOG.debug("Succesfully validated " + ticketValidation.username()); - UserDetails userDetails = this.userDetailsService.loadUserByUsername(ticketValidation.username()); - userDetailsChecker.check(userDetails); - additionalAuthenticationChecks(userDetails, auth); - KerberosServiceRequestToken responseAuth = new KerberosServiceRequestToken( - userDetails, ticketValidation, - userDetails.getAuthorities(), token); - responseAuth.setDetails(authentication.getDetails()); - return responseAuth; - } - - @Override - public boolean supports(Class auth) { - return KerberosServiceRequestToken.class.isAssignableFrom(auth); - } - - @Override - public void afterPropertiesSet() throws Exception { - Assert.notNull(this.ticketValidator, "ticketValidator must be specified"); - Assert.notNull(this.userDetailsService, "userDetailsService must be specified"); - } - - /** - * The UserDetailsService to use, for loading the user properties - * and the GrantedAuthorities. - * - * @param userDetailsService the new user details service - */ - public void setUserDetailsService(UserDetailsService userDetailsService) { - this.userDetailsService = userDetailsService; - } - - /** - * The KerberosTicketValidator to use, for validating - * the Kerberos/SPNEGO tickets. - * - * @param ticketValidator the new ticket validator - */ - public void setTicketValidator(KerberosTicketValidator ticketValidator) { - this.ticketValidator = ticketValidator; - } - - /** - * Allows subclasses to perform any additional checks of a returned UserDetails - * for a given authentication request. - * - * @param userDetails as retrieved from the {@link UserDetailsService} - * @param authentication validated {@link KerberosServiceRequestToken} - * @throws AuthenticationException AuthenticationException if the credentials could not be validated (generally a - * BadCredentialsException, an AuthenticationServiceException) - */ - protected void additionalAuthenticationChecks(UserDetails userDetails, KerberosServiceRequestToken authentication) - throws AuthenticationException { - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceRequestToken.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceRequestToken.java deleted file mode 100644 index a6c687cd..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosServiceRequestToken.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication; - -import java.io.UnsupportedEncodingException; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.Arrays; -import java.util.Collection; - -import javax.security.auth.Subject; - -import org.ietf.jgss.GSSContext; -import org.ietf.jgss.MessageProp; -import org.springframework.security.authentication.AbstractAuthenticationToken; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.crypto.codec.Base64; - -/** - *

Holds the Kerberos/SPNEGO token for requesting a kerberized service and is - * also the output of KerberosServiceAuthenticationProvider.

- *

Will mostly be created in SpnegoAuthenticationProcessingFilter - * and authenticated in KerberosServiceAuthenticationProvider.

- * - * This token cannot be re-authenticated, as you will get a Kerberos Reply - * error. - * - * @author Mike Wiesner - * @author Jeremy Stone - * @since 1.0 - * @see KerberosServiceAuthenticationProvider - */ -public class KerberosServiceRequestToken extends AbstractAuthenticationToken { - - private static final long serialVersionUID = 395488921064775014L; - - private final byte[] token; - - private final Object principal; - - private final transient KerberosTicketValidation ticketValidation; - - /** - * Creates an authenticated token, normally used as an output of an - * authentication provider. - * - * @param principal the user principal (mostly of instance UserDetails) - * @param ticketValidation result of ticket validation - * @param authorities the authorities which are granted to the user - * @param token the Kerberos/SPNEGO token - * @see UserDetails - */ - public KerberosServiceRequestToken(Object principal, KerberosTicketValidation ticketValidation, - Collection authorities, byte[] token) { - super(authorities); - this.token = token; - this.principal = principal; - this.ticketValidation = ticketValidation; - super.setAuthenticated(true); - } - - /** - * Creates an unauthenticated instance which should then be authenticated by - * KerberosServiceAuthenticationProvider. - * - * @param token Kerberos/SPNEGO token - * @see KerberosServiceAuthenticationProvider - */ - public KerberosServiceRequestToken(byte[] token) { - super(null); - this.token = token; - this.ticketValidation = null; - this.principal = null; - } - - /** - * Calculates hashcode based on the Kerberos token - */ - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + Arrays.hashCode(token); - return result; - } - - /** - * equals() is based only on the Kerberos token - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (getClass() != obj.getClass()) - return false; - KerberosServiceRequestToken other = (KerberosServiceRequestToken) obj; - if (!Arrays.equals(token, other.token)) - return false; - return true; - } - - @Override - public Object getCredentials() { - return null; - } - - @Override - public Object getPrincipal() { - return this.principal; - } - - /** - * Returns the Kerberos token - * @return the token data - */ - public byte[] getToken() { - return this.token; - } - - /** - * Gets the ticket validation - * - * @return the ticket validation (which will be null if the token is unauthenticated) - */ - public KerberosTicketValidation getTicketValidation() { - return ticketValidation; - } - - /** - * Determines whether an authenticated token has a response token - * - * @return whether a response token is available - */ - public boolean hasResponseToken() { - return ticketValidation != null && ticketValidation.responseToken() != null; - } - - /** - * Gets the (Base64) encoded response token assuming one is available. - * - * @return encoded response token - */ - public String getEncodedResponseToken() { - if (!hasResponseToken()) - throw new IllegalStateException("Unauthenticated or no response token"); - - try { - return new String(Base64.encode(ticketValidation.responseToken()), "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new IllegalStateException("Unable to encode response token", e); - } - } - - /** - * Unwraps an encrypted message using the gss context - * - * @param data the data - * @param offset data offset - * @param length data length - * @return the decrypted message - * @throws PrivilegedActionException if jaas throws and error - */ - public byte[] decrypt(final byte[] data, final int offset, final int length) throws PrivilegedActionException { - return Subject.doAs(getTicketValidation().subject(), new PrivilegedExceptionAction() { - public byte[] run() throws Exception { - final GSSContext context = getTicketValidation().getGssContext(); - return context.unwrap(data, offset, length, new MessageProp(true)); - } - }); - } - - /** - * Unwraps an encrypted message using the gss context - * - * @param data the data - * @return the decrypted message - * @throws PrivilegedActionException if jaas throws and error - */ - public byte[] decrypt(final byte[] data) throws PrivilegedActionException { - return decrypt(data, 0, data.length); - } - - /** - * Wraps an message using the gss context - * - * @param data the data - * @param offset data offset - * @param length data length - * @return the encrypted message - * @throws PrivilegedActionException if jaas throws and error - */ - public byte[] encrypt(final byte[] data, final int offset, final int length) throws PrivilegedActionException { - return Subject.doAs(getTicketValidation().subject(), new PrivilegedExceptionAction() { - public byte[] run() throws Exception { - final GSSContext context = getTicketValidation().getGssContext(); - return context.wrap(data, offset, length, new MessageProp(true)); - } - }); - } - - /** - * Wraps an message using the gss context - * - * @param data the data - * @return the encrypted message - * @throws PrivilegedActionException if jaas throws and error - */ - public byte[] encrypt(final byte[] data) throws PrivilegedActionException { - return encrypt(data, 0, data.length); - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidation.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidation.java deleted file mode 100644 index 4707a402..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidation.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.springframework.security.kerberos.authentication; - -import java.util.HashSet; - -import javax.security.auth.Subject; -import javax.security.auth.kerberos.KerberosPrincipal; - -import org.ietf.jgss.GSSContext; - -/** - * Result of ticket validation - */ -public class KerberosTicketValidation { - - private final String username; - private final byte[] responseToken; - private final GSSContext gssContext; - private final String servicePrincipal; - - public KerberosTicketValidation(String username, String servicePrincipal, byte[] responseToken, GSSContext gssContext) { - this.username = username; - this.servicePrincipal = servicePrincipal; - this.responseToken = responseToken; - this.gssContext = gssContext; - } - - public String username() { - return username; - } - - public byte[] responseToken() { - return responseToken; - } - - public GSSContext getGssContext() { - return gssContext; - } - - public Subject subject() { - final HashSet princs = new HashSet(); - princs.add(new KerberosPrincipal(servicePrincipal)); - return new Subject(false, princs, new HashSet(), new HashSet()); - } - -} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidator.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidator.java deleted file mode 100644 index 16b75c03..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/KerberosTicketValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication; - -import org.springframework.security.authentication.BadCredentialsException; - -/** - * Implementations of this interface are used in - * {@link KerberosServiceAuthenticationProvider} to validate a Kerberos/SPNEGO - * Ticket. - * - * @author Mike Wiesner - * @author Jeremy Stone - * @since 1.0 - * @see KerberosServiceAuthenticationProvider - */ -public interface KerberosTicketValidator { - - /** - * Validates a Kerberos/SPNEGO ticket. - * - * @param token Kerbeos/SPNEGO ticket - * @return authenticated kerberos principal - * @throws BadCredentialsException if the ticket is not valid - */ - public KerberosTicketValidation validateTicket(byte[] token) - throws BadCredentialsException; -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/GlobalSunJaasKerberosConfig.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/GlobalSunJaasKerberosConfig.java deleted file mode 100644 index 46271846..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/GlobalSunJaasKerberosConfig.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2010-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication.sun; - -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.config.BeanPostProcessor; - -/** - * Config for global jaas. - * - * @author Mike Wiesner - * @since 1.0 - */ -public class GlobalSunJaasKerberosConfig implements BeanPostProcessor, InitializingBean { - - private boolean debug = false; - - private String krbConfLocation; - - @Override - public void afterPropertiesSet() throws Exception { - if (debug) { - System.setProperty("sun.security.krb5.debug", "true"); - } - if (krbConfLocation != null) { - System.setProperty("java.security.krb5.conf", krbConfLocation); - } - - } - - /** - * Enable debug logs from the Sun Kerberos Implementation. Default is false. - * - * @param debug true if debug should be enabled - */ - public void setDebug(boolean debug) { - this.debug = debug; - } - - /** - * Kerberos config file location can be specified here. - * - * @param krbConfLocation the path to krb config file - */ - public void setKrbConfLocation(String krbConfLocation) { - this.krbConfLocation = krbConfLocation; - } - - // The following methods are not used here. This Bean implements only BeanPostProcessor to ensure that it - // is created before any other bean is created, because the system properties needed to be set very early - // in the startup-phase, but after the BeanFactoryPostProcessing. - - @Override - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - return bean; - } - - @Override - public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - return bean; - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosClient.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosClient.java deleted file mode 100644 index 3167c8fb..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosClient.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication.sun; - -import java.io.IOException; -import java.util.HashMap; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; -import javax.security.auth.login.AppConfigurationEntry; -import javax.security.auth.login.Configuration; -import javax.security.auth.login.LoginContext; -import javax.security.auth.login.LoginException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.kerberos.authentication.KerberosClient; - -/** - * Implementation of {@link KerberosClient} which uses the SUN JAAS - * login module, which is included in the SUN JRE, it will not work with an IBM JRE. - * The whole configuration is done in this class, no additional JAAS configuration - * is needed. - * - * @author Mike Wiesner - * @since 1.0 - */ -public class SunJaasKerberosClient implements KerberosClient { - - private boolean debug = false; - - private static final Log LOG = LogFactory.getLog(SunJaasKerberosClient.class); - - @Override - public String login(String username, String password) { - LOG.debug("Trying to authenticate " + username + " with Kerberos"); - String validatedUsername; - - try { - LoginContext loginContext = new LoginContext("", null, new KerberosClientCallbackHandler(username, password), - new LoginConfig(this.debug)); - loginContext.login(); - if (LOG.isDebugEnabled()) { - LOG.debug("Kerberos authenticated user: "+loginContext.getSubject()); - } - validatedUsername = loginContext.getSubject().getPrincipals().iterator().next().toString(); - loginContext.logout(); - } catch (LoginException e) { - throw new BadCredentialsException("Kerberos authentication failed", e); - } - return validatedUsername; - - } - - public void setDebug(boolean debug) { - this.debug = debug; - } - - private static class LoginConfig extends Configuration { - private boolean debug; - - public LoginConfig(boolean debug) { - super(); - this.debug = debug; - } - - @Override - public AppConfigurationEntry[] getAppConfigurationEntry(String name) { - HashMap options = new HashMap(); - options.put("storeKey", "true"); - if (debug) { - options.put("debug", "true"); - } - - return new AppConfigurationEntry[] { new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", - AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options), }; - } - - } - - private static class KerberosClientCallbackHandler implements CallbackHandler { - private String username; - private String password; - - public KerberosClientCallbackHandler(String username, String password) { - this.username = username; - this.password = password; - } - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (Callback callback : callbacks) { - if (callback instanceof NameCallback) { - NameCallback ncb = (NameCallback) callback; - ncb.setName(username); - } else if (callback instanceof PasswordCallback) { - PasswordCallback pwcb = (PasswordCallback) callback; - pwcb.setPassword(password.toCharArray()); - } else { - throw new UnsupportedCallbackException(callback, "We got a " + callback.getClass().getCanonicalName() - + ", but only NameCallback and PasswordCallback is supported"); - } - } - - } - - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosTicketValidator.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosTicketValidator.java deleted file mode 100644 index fcc62405..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/authentication/sun/SunJaasKerberosTicketValidator.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.authentication.sun; - -import java.security.Principal; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; - -import javax.security.auth.Subject; -import javax.security.auth.kerberos.KerberosPrincipal; -import javax.security.auth.login.AppConfigurationEntry; -import javax.security.auth.login.Configuration; -import javax.security.auth.login.LoginContext; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.ietf.jgss.GSSContext; -import org.ietf.jgss.GSSCredential; -import org.ietf.jgss.GSSManager; -import org.ietf.jgss.GSSName; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.kerberos.authentication.KerberosTicketValidation; -import org.springframework.security.kerberos.authentication.KerberosTicketValidator; -import org.springframework.util.Assert; - -/** - * Implementation of {@link KerberosTicketValidator} which uses the SUN JAAS - * login module, which is included in the SUN JRE, it will not work with an IBM JRE. - * The whole configuration is done in this class, no additional JAAS configuration - * is needed. - * - * @author Mike Wiesner - * @author Jeremy Stone - * @since 1.0 - */ -public class SunJaasKerberosTicketValidator implements KerberosTicketValidator, InitializingBean { - - private String servicePrincipal; - private Resource keyTabLocation; - private Subject serviceSubject; - private boolean holdOnToGSSContext; - private boolean debug = false; - private static final Log LOG = LogFactory.getLog(SunJaasKerberosTicketValidator.class); - - @Override - public KerberosTicketValidation validateTicket(byte[] token) { - try { - return Subject.doAs(this.serviceSubject, new KerberosValidateAction(token)); - } - catch (PrivilegedActionException e) { - throw new BadCredentialsException("Kerberos validation not succesful", e); - } - } - - @Override - public void afterPropertiesSet() throws Exception { - Assert.notNull(this.servicePrincipal, "servicePrincipal must be specified"); - Assert.notNull(this.keyTabLocation, "keyTab must be specified"); - if (keyTabLocation instanceof ClassPathResource) { - LOG.warn("Your keytab is in the classpath. This file needs special protection and shouldn't be in the classpath. JAAS may also not be able to load this file from classpath."); - } - String keyTabLocationAsString = this.keyTabLocation.getURL().toExternalForm(); - // We need to remove the file prefix (if there is one), as it is not supported in Java 7 anymore. - // As Java 6 accepts it with and without the prefix, we don't need to check for Java 7 - if (keyTabLocationAsString.startsWith("file:")) - { - keyTabLocationAsString = keyTabLocationAsString.substring(5); - } - LoginConfig loginConfig = new LoginConfig(keyTabLocationAsString, this.servicePrincipal, - this.debug); - Set princ = new HashSet(1); - princ.add(new KerberosPrincipal(this.servicePrincipal)); - Subject sub = new Subject(false, princ, new HashSet(), new HashSet()); - LoginContext lc = new LoginContext("", sub, null, loginConfig); - lc.login(); - this.serviceSubject = lc.getSubject(); - } - - /** - * The service principal of the application. - * For web apps this is HTTP/full-qualified-domain-name@DOMAIN. - * The keytab must contain the key for this principal. - * - * @param servicePrincipal service principal to use - * @see #setKeyTabLocation(Resource) - */ - public void setServicePrincipal(String servicePrincipal) { - this.servicePrincipal = servicePrincipal; - } - - /** - *

The location of the keytab. You can use the normale Spring Resource - * prefixes like file: or classpath:, but as the - * file is later on read by JAAS, we cannot guarantee that classpath - * works in every environment, esp. not in Java EE application servers. You - * should use file: there. - * - * This file also needs special protection, which is another reason to - * not include it in the classpath but rather use file:/etc/http.keytab - * for example. - * - * @param keyTabLocation The location where the keytab resides - */ - public void setKeyTabLocation(Resource keyTabLocation) { - this.keyTabLocation = keyTabLocation; - } - - /** - * Enables the debug mode of the JAAS Kerberos login module. - * - * @param debug default is false - */ - public void setDebug(boolean debug) { - this.debug = debug; - } - - /** - * Determines whether to hold on to the {@link GSSContext GSS security context} or - * otherwise {@link GSSContext#dispose() dispose} of it immediately (the default behaviour). - *

Holding on to the GSS context allows decrypt and encrypt operations for subsequent - * interactions with the principal. - * - * @param holdOnToGSSContext true if should hold on to context - */ - public void setHoldOnToGSSContext(boolean holdOnToGSSContext) { - this.holdOnToGSSContext = holdOnToGSSContext; - } - - /** - * This class is needed, because the validation must run with previously generated JAAS subject - * which belongs to the service principal and was loaded out of the keytab during startup. - */ - private class KerberosValidateAction implements PrivilegedExceptionAction { - byte[] kerberosTicket; - - public KerberosValidateAction(byte[] kerberosTicket) { - this.kerberosTicket = kerberosTicket; - } - - @Override - public KerberosTicketValidation run() throws Exception { - GSSContext context = GSSManager.getInstance().createContext((GSSCredential) null); - byte[] responseToken = context.acceptSecContext(kerberosTicket, 0, kerberosTicket.length); - GSSName gssName = context.getSrcName(); - if (gssName == null) { - throw new BadCredentialsException("GSSContext name of the context initiator is null"); - } - if (!holdOnToGSSContext) { - context.dispose(); - } - return new KerberosTicketValidation(gssName.toString(), servicePrincipal, responseToken, context); - } - } - - /** - * Normally you need a JAAS config file in order to use the JAAS Kerberos Login Module, - * with this class it is not needed and you can have different configurations in one JVM. - */ - private static class LoginConfig extends Configuration { - private String keyTabLocation; - private String servicePrincipalName; - private boolean debug; - - public LoginConfig(String keyTabLocation, String servicePrincipalName, boolean debug) { - this.keyTabLocation = keyTabLocation; - this.servicePrincipalName = servicePrincipalName; - this.debug = debug; - } - - @Override - public AppConfigurationEntry[] getAppConfigurationEntry(String name) { - HashMap options = new HashMap(); - options.put("useKeyTab", "true"); - options.put("keyTab", this.keyTabLocation); - options.put("principal", this.servicePrincipalName); - options.put("storeKey", "true"); - options.put("doNotPrompt", "true"); - if (this.debug) { - options.put("debug", "true"); - } - options.put("isInitiator", "false"); - - return new AppConfigurationEntry[] { new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", - AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options), }; - } - - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/dummy/DummyUserDetailsService.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/dummy/DummyUserDetailsService.java deleted file mode 100644 index 9fdcab62..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/dummy/DummyUserDetailsService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.dummy; - -import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.userdetails.User; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; - -//tag::snippetA[] -public class DummyUserDetailsService implements UserDetailsService { - - @Override - public UserDetails loadUserByUsername(String username) - throws UsernameNotFoundException { - return new User(username, "notUsed", true, true, true, true, - AuthorityUtils.createAuthorityList("ROLE_USER")); - } - -} -//end::snippetA[] diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/ResponseHeaderSettingKerberosAuthenticationSuccessHandler.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/ResponseHeaderSettingKerberosAuthenticationSuccessHandler.java deleted file mode 100644 index 028b6e92..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/ResponseHeaderSettingKerberosAuthenticationSuccessHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2014-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.web.authentication; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.core.Authentication; -import org.springframework.security.kerberos.authentication.KerberosServiceRequestToken; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; - -/** - * Adds a WWW-Authenticate (or other) header to the response following - * successful authentication. - * - * @author Jeremy Stone - */ -public class ResponseHeaderSettingKerberosAuthenticationSuccessHandler implements AuthenticationSuccessHandler { - - private static final String NEGOTIATE_PREFIX = "Negotiate "; - - private static final String WWW_AUTHENTICATE = "WWW-Authenticate"; - - private String headerName = WWW_AUTHENTICATE; - - private String headerPrefix = NEGOTIATE_PREFIX; - - /** - * Sets the name of the header to set. By default this is 'WWW-Authenticate'. - * - * @param headerName the www authenticate header name - */ - public void setHeaderName(String headerName) { - this.headerName = headerName; - } - - /** - * Sets the value of the prefix for the encoded response token value. By - * default this is 'Negotiate '. - * - * @param headerPrefix the negotiate prefix - */ - public void setHeaderPrefix(String headerPrefix) { - this.headerPrefix = headerPrefix; - } - - @Override - public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, - Authentication authentication) throws IOException, ServletException { - KerberosServiceRequestToken auth = (KerberosServiceRequestToken) authentication; - if (auth.hasResponseToken()) { - response.addHeader(headerName, headerPrefix + auth.getEncodedResponseToken()); - } - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoAuthenticationProcessingFilter.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoAuthenticationProcessingFilter.java deleted file mode 100644 index e3a8456d..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoAuthenticationProcessingFilter.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright 2002-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.web.authentication; - -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.authentication.AnonymousAuthenticationToken; -import org.springframework.security.authentication.AuthenticationDetailsSource; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.crypto.codec.Base64; -import org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider; -import org.springframework.security.kerberos.authentication.KerberosServiceRequestToken; -import org.springframework.security.web.authentication.AuthenticationFailureHandler; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; -import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; -import org.springframework.security.web.authentication.session.NullAuthenticatedSessionStrategy; -import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; -import org.springframework.util.Assert; -import org.springframework.web.filter.GenericFilterBean; - -/** - * Parses the SPNEGO authentication Header, which was generated by the browser - * and creates a {@link KerberosServiceRequestToken} out if it. It will then - * call the {@link AuthenticationManager}. - * - *

A typical Spring Security configuration might look like this:

- * - *
- * <beans xmlns="http://www.springframework.org/schema/beans"
- * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://www.springframework.org/schema/security"
- * xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- * 	http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
- *
- * <sec:http entry-point-ref="spnegoEntryPoint">
- * 	<sec:intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_FULLY" />
- * 	<sec:custom-filter ref="spnegoAuthenticationProcessingFilter" position="BASIC_AUTH_FILTER" />
- * </sec:http>
- *
- * <bean id="spnegoEntryPoint" class="org.springframework.security.kerberos.web.authentication.SpnegoEntryPoint" />
- *
- * <bean id="spnegoAuthenticationProcessingFilter"
- * 	class="org.springframework.security.kerberos.web.authentication.SpnegoAuthenticationProcessingFilter">
- * 	<property name="authenticationManager" ref="authenticationManager" />
- * </bean>
- *
- * <sec:authentication-manager alias="authenticationManager">
- * 	<sec:authentication-provider ref="kerberosServiceAuthenticationProvider" />
- * </sec:authentication-manager>
- *
- * <bean id="kerberosServiceAuthenticationProvider"
- * 	class="org.springframework.security.kerberos.authenitcation.KerberosServiceAuthenticationProvider">
- * 	<property name="ticketValidator">
- * 		<bean class="org.springframework.security.kerberos.authentication.sun.SunJaasKerberosTicketValidator">
- * 			<property name="servicePrincipal" value="HTTP/web.springsource.com" />
- * 			<property name="keyTabLocation" value="classpath:http-java.keytab" />
- * 		</bean>
- * 	</property>
- * 	<property name="userDetailsService" ref="inMemoryUserDetailsService" />
- * </bean>
- *
- * <bean id="inMemoryUserDetailsService"
- * 	class="org.springframework.security.core.userdetails.memory.InMemoryDaoImpl">
- * 	<property name="userProperties">
- * 		<value>
- * 			mike@SECPOD.DE=notUsed,ROLE_ADMIN
- * 		</value>
- * 	</property>
- * </bean>
- * </beans>
- * 
- * - *

If you get a "GSSException: Channel binding mismatch (Mechanism - * level:ChannelBinding not provided!) have a look at this bug.

- *

A workaround unti this is fixed in the JVM is to change

- * HKEY_LOCAL_MACHINE\System - * \CurrentControlSet\Control\LSA\SuppressExtendedProtection to 0x02 - * - * - * @author Mike Wiesner - * @author Jeremy Stone - * @since 1.0 - * @see KerberosServiceAuthenticationProvider - * @see SpnegoEntryPoint - */ -public class SpnegoAuthenticationProcessingFilter extends GenericFilterBean { - - private AuthenticationDetailsSource authenticationDetailsSource = new WebAuthenticationDetailsSource(); - private AuthenticationManager authenticationManager; - private AuthenticationSuccessHandler successHandler; - private AuthenticationFailureHandler failureHandler; - private SessionAuthenticationStrategy sessionStrategy = new NullAuthenticatedSessionStrategy(); - private boolean skipIfAlreadyAuthenticated = true; - - @Override - public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { - HttpServletRequest request = (HttpServletRequest) req; - HttpServletResponse response = (HttpServletResponse) res; - - if (skipIfAlreadyAuthenticated) { - Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication(); - - if (existingAuth != null && existingAuth.isAuthenticated() - && (existingAuth instanceof AnonymousAuthenticationToken) == false) { - chain.doFilter(request, response); - return; - } - } - - String header = request.getHeader("Authorization"); - - if (header != null && (header.startsWith("Negotiate ") || header.startsWith("Kerberos "))) { - if (logger.isDebugEnabled()) { - logger.debug("Received Negotiate Header for request " + request.getRequestURL() + ": " + header); - } - byte[] base64Token = header.substring(header.indexOf(" ") + 1).getBytes("UTF-8"); - byte[] kerberosTicket = Base64.decode(base64Token); - KerberosServiceRequestToken authenticationRequest = new KerberosServiceRequestToken(kerberosTicket); - authenticationRequest.setDetails(authenticationDetailsSource.buildDetails(request)); - Authentication authentication; - try { - authentication = authenticationManager.authenticate(authenticationRequest); - } catch (AuthenticationException e) { - // That shouldn't happen, as it is most likely a wrong - // configuration on the server side - logger.warn("Negotiate Header was invalid: " + header, e); - SecurityContextHolder.clearContext(); - if (failureHandler != null) { - failureHandler.onAuthenticationFailure(request, response, e); - } else { - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - response.flushBuffer(); - } - return; - } - sessionStrategy.onAuthentication(authentication, request, response); - SecurityContextHolder.getContext().setAuthentication(authentication); - if (successHandler != null) { - successHandler.onAuthenticationSuccess(request, response, authentication); - } - - } - - chain.doFilter(request, response); - - } - - @Override - public void afterPropertiesSet() throws ServletException { - super.afterPropertiesSet(); - Assert.notNull(this.authenticationManager, "authenticationManager must be specified"); - } - - /** - * The authentication manager for validating the ticket. - * - * @param authenticationManager the authentication manager - */ - public void setAuthenticationManager(AuthenticationManager authenticationManager) { - this.authenticationManager = authenticationManager; - } - - /** - *

This handler is called after a successful authentication. One can add - * additional authentication behavior by setting this.

- *

Default is null, which means nothing additional happens

- * - * @param successHandler the authentication success handler - */ - public void setSuccessHandler(AuthenticationSuccessHandler successHandler) { - this.successHandler = successHandler; - } - - /** - *

This handler is called after a failure authentication. In most cases you - * only get Kerberos/SPNEGO failures with a wrong server or network - * configurations and not during runtime. If the client encounters an error, - * he will just stop the communication with server and therefore this - * handler will not be called in this case.

- *

Default is null, which means that the Filter returns the HTTP 500 code

- * - * @param failureHandler the authentication failure handler - */ - public void setFailureHandler(AuthenticationFailureHandler failureHandler) { - this.failureHandler = failureHandler; - } - - - /** - * Should Kerberos authentication be skipped if a user is already authenticated - * for this request (e.g. in the HTTP session). - * - * @param skipIfAlreadyAuthenticated default is true - */ - public void setSkipIfAlreadyAuthenticated(boolean skipIfAlreadyAuthenticated) { - this.skipIfAlreadyAuthenticated = skipIfAlreadyAuthenticated; - } - - /** - * The session handling strategy which will be invoked immediately after an - * authentication request is successfully processed by the - * AuthenticationManager. Used, for example, to handle changing of - * the session identifier to prevent session fixation attacks. - * - * @param sessionStrategy the implementation to use. If not set a null - * implementation is used. - */ - public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionStrategy) { - this.sessionStrategy = sessionStrategy; - } - - - /** - * Sets the authentication details source. - * - * @param authenticationDetailsSource the authentication details source - */ - public void setAuthenticationDetailsSource( - AuthenticationDetailsSource authenticationDetailsSource) { - Assert.notNull(authenticationDetailsSource, "AuthenticationDetailsSource required"); - this.authenticationDetailsSource = authenticationDetailsSource; - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoEntryPoint.java b/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoEntryPoint.java deleted file mode 100644 index 10a59c66..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/java/org/springframework/security/kerberos/web/authentication/SpnegoEntryPoint.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2009-2015 the original author or authors. - * - * Licensed 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. - */ -package org.springframework.security.kerberos.web.authentication; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; -import org.springframework.security.web.util.UrlUtils; -import org.springframework.util.Assert; -import org.springframework.util.StringUtils; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * Sends back a request for a Negotiate Authentication to the browser. - * - *

With optional configured forwardUrl it is possible to use form - * login as fallback authentication.

- * - *

This approach enables security configuration to use SPNEGO in combination - * with login form as fallback for clients that do not support this kind of - * authentication. Set Response Code 401 - unauthorized and forward to login - * page. A useful scenario might be an environment where windows domain is - * present but it is required to access the application also from non domain - * client devices. One could use a combination with form based LDAP login.

- * - *

See spnego-with-form-login.xml in - * spring-security-kerberos-sample for details

- * - * - * @author Mike Wiesner - * @author Andre Schaefer, Namics AG - * @since 1.0 - * @see SpnegoAuthenticationProcessingFilter - */ -public class SpnegoEntryPoint implements AuthenticationEntryPoint { - - private static final Log LOG = LogFactory.getLog(SpnegoEntryPoint.class); - - private final String forwardUrl; - - private final boolean forward; - - /** - * Instantiates a new spnego entry point. Using this constructor the - * EntryPoint will Sends back a request for a Negotiate Authentication to - * the browser without providing a fallback mechanism for login, Use - * constructor with forwardUrl to provide form based login. - */ - public SpnegoEntryPoint() { - this(null); - } - - /** - * Instantiates a new spnego entry point. This constructor enables security - * configuration to use SPNEGO in combination with login form as fallback - * for clients that do not support this kind of authentication. - * - * @param forwardUrl - * URL where the login page can be found. Should be - * relative to the web-app context path (include a leading - * {@code /}) and can't be absolute URL. - */ - public SpnegoEntryPoint(String forwardUrl) { - LOG.info("forwardUrl : "+forwardUrl); - System.out.println("forwardUrl : "+forwardUrl); - if (StringUtils.hasText(forwardUrl)) { - Assert.isTrue(UrlUtils.isValidRedirectUrl(forwardUrl), "Forward url specified must be a valid forward URL"); - Assert.isTrue(!UrlUtils.isAbsoluteUrl(forwardUrl), "Forward url specified must not be absolute"); - this.forwardUrl = forwardUrl; - this.forward = true; - } else { - this.forwardUrl = null; - this.forward = false; - } - } - - public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException ex) - throws IOException, ServletException { - if (LOG.isDebugEnabled()) { - LOG.debug("Add header WWW-Authenticate:Negotiate to " + request.getRequestURL() + ", forward: " - + (forward ? forwardUrl : "no")); - } - response.addHeader("WWW-Authenticate", "Negotiate"); - response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); - - if (forward) { - RequestDispatcher dispatcher = request.getRequestDispatcher(forwardUrl); - dispatcher.forward(request, response); - } else { - response.flushBuffer(); - } - } - -} diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/META-INF/MANIFEST.MF b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/applicationContext.xml b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/applicationContext.xml deleted file mode 100644 index 4f6702b1..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/error.jsp b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/error.jsp deleted file mode 100644 index 1d87aba9..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/error.jsp +++ /dev/null @@ -1,12 +0,0 @@ - -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - - - - error - - -

${errorMessage}!

- - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos.jsp b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos.jsp deleted file mode 100644 index a55f3897..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos.jsp +++ /dev/null @@ -1,46 +0,0 @@ - -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ page session="false" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - - - -
- - -
- - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos_diagnose.jsp b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos_diagnose.jsp deleted file mode 100644 index ffd81c94..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/jsp/kerberos_diagnose.jsp +++ /dev/null @@ -1,54 +0,0 @@ - -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ page session="false" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - kerberos - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

kerberos

namevalue
userDomain${kerberosUserDomain}
RemoteUser<%= request.getRemoteUser() %>
Full Principal${kerberosPrincipal}
Short Principal${shortPrincipal}
token Post Location${tokenPostLocation}
kerberos Token${kerberosToken}
Encrypted kerberos Token${encryptedKerberosToken}
-

-
- - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos-servlet.xml b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos-servlet.xml deleted file mode 100644 index 76c0eace..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos-servlet.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos.properties b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos.properties deleted file mode 100644 index e37630c8..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/kerberos.properties +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################ -# ConnSec Cloud Identity and Access Management -# Version 2.0 GA - -# Copyright (c) 2002-2014 ConnSec SoftWare, Inc. -# We're focus on Cloud Identity and Security -# http://www.connsec.com -############################################################################ -############################################################################ -# Kerberos/SPNEGO configuration -# The follow settings is for Kerberos/SPNEGO Authentication -#User Domain -config.kerberos.userdomain=CONNSEC -# ================================ -config.kerberos.debug=true -#forward to kerberos.jsp -config.kerberos.diagnose=true -# These settings are only needed for SPNEGO Authentication -# ======================================================== -config.kerberos.prinicipal=HTTP/login.connsec.com@CONNSEC.COM -# Setting keyTabLocation to a classpath resource will most likely not work in a Java EE application Server -# It must always be an absolute path. -# See the Javadoc of SunJaasKerberosTicketValidator for more information on that -config.kerberos.keytab.location=file\:c\:/connsec.keytab.config -# These settings are only needed for server side Kerberos Authentication -# ====================================================================== -# No Prefix is supported in kerberos.conf.location. It must always be an absolute path. -config.kerberos.conf.location=c\:/krb5.conf -#crypto for AES , then to HEX -config.kerberos.crypto=846KZSzYq56M6d5o -#validity minute -config.kerberos.validity=5 -# -config.kerberos.token.post.location=https://login.connsec.com/sec/login diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.conf b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.conf deleted file mode 100644 index 282d37d6..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.conf +++ /dev/null @@ -1,6 +0,0 @@ -[libdefaults] - default_realm = CONNSEC.COM -[realms] - CONNSEC.COM = { - kdc = dc.connsec.com - } \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.ini b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.ini deleted file mode 100644 index 7fa643f8..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/krb5.ini +++ /dev/null @@ -1,7 +0,0 @@ -[libdefaults] - default_realm = CONNSEC.COM -[realms] - CONNSEC.COM = { - kdc = dc.connsec.com - } -[] diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/tags/c.tld b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/tags/c.tld deleted file mode 100644 index 22698c97..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/tags/c.tld +++ /dev/null @@ -1,563 +0,0 @@ - - - - - JSTL 1.1 core library - JSTL core - 1.1 - c - http://java.sun.com/jsp/jstl/core - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - - - - Catches any Throwable that occurs in its body and optionally - exposes it. - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - -Name of the exported scoped variable for the -exception thrown from a nested action. The type of the -scoped variable is the type of the exception thrown. - - var - false - false - - - - - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - choose - org.apache.taglibs.standard.tag.common.core.ChooseTag - JSP - - - - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - if - org.apache.taglibs.standard.tag.rt.core.IfTag - JSP - - -The test condition that determines whether or -not the body content should be processed. - - test - true - true - boolean - - - -Name of the exported scoped variable for the -resulting value of the test condition. The type -of the scoped variable is Boolean. - - var - false - false - - - -Scope for var. - - scope - false - false - - - - - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - import - org.apache.taglibs.standard.tag.rt.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - -The URL of the resource to import. - - url - true - true - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is Reader. - - varReader - false - false - - - -Name of the context when accessing a relative -URL resource that belongs to a foreign -context. - - context - false - true - - - -Character encoding of the content at the input -resource. - - charEncoding - false - true - - - - - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - forEach - org.apache.taglibs.standard.tag.rt.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - -Collection of items to iterate over. - - items - false - true - java.lang.Object - - - -If items specified: -Iteration begins at the item located at the -specified index. First item of the collection has -index 0. -If items not specified: -Iteration begins with index set at the value -specified. - - begin - false - true - int - - - -If items specified: -Iteration ends at the item located at the -specified index (inclusive). -If items not specified: -Iteration ends when index reaches the value -specified. - - end - false - true - int - - - -Iteration will only process every step items of -the collection, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. Its type depends -on the object of the underlying collection. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of type -javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Iterates over tokens, separated by the supplied delimeters - - forTokens - org.apache.taglibs.standard.tag.rt.core.ForTokensTag - JSP - - -String of tokens to iterate over. - - items - true - true - java.lang.String - - - -The set of delimiters (the characters that -separate the tokens in the string). - - delims - true - true - java.lang.String - - - -Iteration begins at the token located at the -specified index. First token has index 0. - - begin - false - true - int - - - -Iteration ends at the token located at the -specified index (inclusive). - - end - false - true - int - - - -Iteration will only process every step tokens -of the string, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of -type -javax.servlet.jsp.jstl.core.LoopTag -Status. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Like <%= ... >, but for expressions. - - out - org.apache.taglibs.standard.tag.rt.core.OutTag - JSP - - -Expression to be evaluated. - - value - true - true - - - -Default value if the resulting value is null. - - default - false - true - - - -Determines whether characters <,>,&,'," in the -resulting string should be converted to their -corresponding character entity codes. Default value is -true. - - escapeXml - false - true - - - - - - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - otherwise - org.apache.taglibs.standard.tag.common.core.OtherwiseTag - JSP - - - - - Adds a parameter to a containing 'import' tag's URL. - - param - org.apache.taglibs.standard.tag.rt.core.ParamTag - JSP - - -Name of the query string parameter. - - name - true - true - - - -Value of the parameter. - - value - false - true - - - - - - Redirects to a new URL. - - redirect - org.apache.taglibs.standard.tag.rt.core.RedirectTag - JSP - - -The URL of the resource to redirect to. - - url - false - true - - - -Name of the context when redirecting to a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Removes a scoped variable (from a particular scope, if specified). - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - -Name of the scoped variable to be removed. - - var - true - false - - - -Scope for var. - - scope - false - false - - - - - - Sets the result of an expression evaluation in a 'scope' - - set - org.apache.taglibs.standard.tag.rt.core.SetTag - JSP - - -Name of the exported scoped variable to hold the value -specified in the action. The type of the scoped variable is -whatever type the value expression evaluates to. - - var - false - false - - - -Expression to be evaluated. - - value - false - true - - - -Target object whose property will be set. Must evaluate to -a JavaBeans object with setter property property, or to a -java.util.Map object. - - target - false - true - - - -Name of the property to be set in the target object. - - property - false - true - - - -Scope for var. - - scope - false - false - - - - - - Creates a URL with optional query parameters. - - url - org.apache.taglibs.standard.tag.rt.core.UrlTag - JSP - - -Name of the exported scoped variable for the -processed url. The type of the scoped variable is -String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -URL to be processed. - - value - false - true - - - -Name of the context when specifying a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - when - org.apache.taglibs.standard.tag.rt.core.WhenTag - JSP - - -The test condition that determines whether or not the -body content should be processed. - - test - true - true - boolean - - - - diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/web.xml b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 969a686d..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - connsec maxkey kerberos auth broker - - webAppRootKey - connsec.maxkey.sec.kerberos.root - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - contextAttribute - org.springframework.web.servlet.FrameworkServlet.CONTEXT.kerberos - - - - springSecurityFilterChain - /* - - - org.springframework.web.context.ContextLoaderListener - - - log4jConfigLocation - classpath:/log4j.properties - - - org.springframework.web.util.Log4jConfigListener - - - kerberos - org.springframework.web.servlet.DispatcherServlet - 1 - - - kerberos - / - - - - - - http://java.sun.com/jsp/jstl/core - /WEB-INF/tags/c.tld - - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/css/defaulttable.css b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/css/defaulttable.css deleted file mode 100644 index 543fb15f..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/css/defaulttable.css +++ /dev/null @@ -1,17 +0,0 @@ -.datagrid table { border-collapse: collapse; text-align: left; width: 100%; } -.datagrid {font: normal 12px/150% Arial, Helvetica, sans-serif; background: #fff; overflow: hidden; border: 1px solid #006699; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } -.datagrid table td, .datagrid table th { padding: 3px 10px;line-height: 32px; } -.datagrid table thead th {background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );background:-moz-linear-gradient( center top, #006699 5%, #00557F 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');background-color:#006699; color:#FFFFFF; font-size: 15px; font-weight: bold; border-left: 1px solid #0070A8; } -.datagrid table thead th:first-child { border: none; } -.datagrid table tbody td { color: #00557F; border-left: 1px solid #E1EEF4;font-size: 12px;font-weight: normal; } -.datagrid table tbody .alt td { background: #E1EEf4; color: #00557F; } -.datagrid table tbody td:first-child { border-left: none; } -.datagrid table tbody tr:last-child td { border-bottom: none; } -.datagrid table tfoot td div { border-top: 1px solid #006699;background: #E1EEf4;} - .datagrid table tfoot td { padding: 0; font-size: 12px } -.datagrid table tfoot td div{ padding: 2px; } -.datagrid table tfoot td ul { margin: 0; padding:0; list-style: none; text-align: right; } -.datagrid table tfoot li { display: inline; } -.datagrid table tfoot li a { text-decoration: none; display: inline-block; padding: 2px 8px; margin: 1px;color: #FFFFFF;border: 1px solid #006699;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );background:-moz-linear-gradient( center top, #006699 5%, #00557F 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');background-color:#006699; } -.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover { text-decoration: none;border-color: #00557F; color: #FFFFFF; background: none; background-color:#006699;} - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/index.jsp b/maxkey-webs/maxkey-web-kerberos/src/main/webapp/index.jsp deleted file mode 100644 index 83dafa30..00000000 --- a/maxkey-webs/maxkey-web-kerberos/src/main/webapp/index.jsp +++ /dev/null @@ -1,13 +0,0 @@ - -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page import="org.maxkey.web.contorller.KerberosController" %> - - - - Kerberos for window authentication - - - - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-manage/.project b/maxkey-webs/maxkey-web-manage/.project index b4a45dfd..8b006b9d 100644 --- a/maxkey-webs/maxkey-web-manage/.project +++ b/maxkey-webs/maxkey-web-manage/.project @@ -3,6 +3,13 @@ maxkey-web-manage maxkey-web-manage + maxkey-protocol-oauth-2.0 + maxkey-protocol-authorize + maxkey-protocol-saml-2.0 + maxkey-dao + maxkey-core + maxkey-jose-jwt + maxkey-client-sdk diff --git a/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.core.prefs b/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.launching.prefs b/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-webs/maxkey-web-manage/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-webs/maxkey-web-manage/bin/main/.gitignore b/maxkey-webs/maxkey-web-manage/bin/main/.gitignore new file mode 100644 index 00000000..cf1db2ee --- /dev/null +++ b/maxkey-webs/maxkey-web-manage/bin/main/.gitignore @@ -0,0 +1 @@ +/org/ diff --git a/maxkey-webs/maxkey-web-manage/build.gradle b/maxkey-webs/maxkey-web-manage/build.gradle index da099099..799da865 100644 --- a/maxkey-webs/maxkey-web-manage/build.gradle +++ b/maxkey-webs/maxkey-web-manage/build.gradle @@ -12,7 +12,7 @@ dependencies { compile project(":maxkey-dao") compile project(":maxkey-client-sdk") compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0") - compile project(":maxkey-protocols:maxkey-protocol-saml-2.0") + compile project(":maxkey-protocols:maxkey-protocol-saml-2.0") } diff --git a/maxkey-webs/maxkey-web-manage/src/main/webapp/WEB-INF/views/userinfo/usersList.jsp b/maxkey-webs/maxkey-web-manage/src/main/webapp/WEB-INF/views/userinfo/usersList.jsp index 6c2df6b8..11db3f50 100644 --- a/maxkey-webs/maxkey-web-manage/src/main/webapp/WEB-INF/views/userinfo/usersList.jsp +++ b/maxkey-webs/maxkey-web-manage/src/main/webapp/WEB-INF/views/userinfo/usersList.jsp @@ -55,36 +55,36 @@
- +
@@ -96,29 +96,30 @@
:
- - "> - " expandValue="" collapseValue=""> + + "> + " expandValue="" collapseValue="">
- " + " wurl="/users/forwardChangePassword" wwidth="600px" wheight="250px" /> - " + " wurl="/users/forwardSelectUserType" wwidth="960" wheight="600" target="window"> - " + " wurl="/users/forwardUpdate" wwidth="960" wheight="600" target="window"> - " + " wurl="/users/delete" />
+
- + + + + - + + + + " title="department" wurl="/orgs/orgsSelect/deptId/department" wwidth="300" wheight="400" /> + diff --git a/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.core.prefs b/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8345447b --- /dev/null +++ b/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,16 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=warning +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.launching.prefs b/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..d211d326 --- /dev/null +++ b/maxkey-webs/maxkey-web-maxkey/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-webs/maxkey-web-wiki/.classpath b/maxkey-webs/maxkey-web-wiki/.classpath deleted file mode 100644 index 82220adb..00000000 --- a/maxkey-webs/maxkey-web-wiki/.classpath +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/maxkey-webs/maxkey-web-wiki/.project b/maxkey-webs/maxkey-web-wiki/.project deleted file mode 100644 index f2e3e075..00000000 --- a/maxkey-webs/maxkey-web-wiki/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - maxkey-web-wiki - maxkey-web-wiki - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.buildship.core.prefs b/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 24c7e1bf..00000000 --- a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.project.facet.core.builder,org.eclipse.wst.validation.validationbuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=../.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/,org.eclipse.jst.j2ee.internal.web.container -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.project.facet.core.nature,org.eclipse.wst.common.modulecore.ModuleCoreNature,org.eclipse.jem.workbench.JavaEMFNature -project.path=\:maxkey-webs\:maxkey-web-wiki diff --git a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.core.resources.prefs b/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53..00000000 --- a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.component b/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 2b8e726b..00000000 --- a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index cea524ad..00000000 --- a/maxkey-webs/maxkey-web-wiki/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-webs/maxkey-web-wiki/build.gradle b/maxkey-webs/maxkey-web-wiki/build.gradle deleted file mode 100644 index e6041fb7..00000000 --- a/maxkey-webs/maxkey-web-wiki/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-web-wiki" - -apply plugin: 'war' -apply plugin: 'eclipse-wtp' - -eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'maxkey-wiki' - - } - - } -} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/META-INF/MANIFEST.MF b/maxkey-webs/maxkey-web-wiki/src/META-INF/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/c.tld b/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/c.tld deleted file mode 100644 index 22698c97..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/c.tld +++ /dev/null @@ -1,563 +0,0 @@ - - - - - JSTL 1.1 core library - JSTL core - 1.1 - c - http://java.sun.com/jsp/jstl/core - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - - - - Catches any Throwable that occurs in its body and optionally - exposes it. - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - -Name of the exported scoped variable for the -exception thrown from a nested action. The type of the -scoped variable is the type of the exception thrown. - - var - false - false - - - - - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - choose - org.apache.taglibs.standard.tag.common.core.ChooseTag - JSP - - - - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - if - org.apache.taglibs.standard.tag.rt.core.IfTag - JSP - - -The test condition that determines whether or -not the body content should be processed. - - test - true - true - boolean - - - -Name of the exported scoped variable for the -resulting value of the test condition. The type -of the scoped variable is Boolean. - - var - false - false - - - -Scope for var. - - scope - false - false - - - - - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - import - org.apache.taglibs.standard.tag.rt.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - -The URL of the resource to import. - - url - true - true - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is Reader. - - varReader - false - false - - - -Name of the context when accessing a relative -URL resource that belongs to a foreign -context. - - context - false - true - - - -Character encoding of the content at the input -resource. - - charEncoding - false - true - - - - - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - forEach - org.apache.taglibs.standard.tag.rt.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - -Collection of items to iterate over. - - items - false - true - java.lang.Object - - - -If items specified: -Iteration begins at the item located at the -specified index. First item of the collection has -index 0. -If items not specified: -Iteration begins with index set at the value -specified. - - begin - false - true - int - - - -If items specified: -Iteration ends at the item located at the -specified index (inclusive). -If items not specified: -Iteration ends when index reaches the value -specified. - - end - false - true - int - - - -Iteration will only process every step items of -the collection, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. Its type depends -on the object of the underlying collection. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of type -javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Iterates over tokens, separated by the supplied delimeters - - forTokens - org.apache.taglibs.standard.tag.rt.core.ForTokensTag - JSP - - -String of tokens to iterate over. - - items - true - true - java.lang.String - - - -The set of delimiters (the characters that -separate the tokens in the string). - - delims - true - true - java.lang.String - - - -Iteration begins at the token located at the -specified index. First token has index 0. - - begin - false - true - int - - - -Iteration ends at the token located at the -specified index (inclusive). - - end - false - true - int - - - -Iteration will only process every step tokens -of the string, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of -type -javax.servlet.jsp.jstl.core.LoopTag -Status. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Like <%= ... >, but for expressions. - - out - org.apache.taglibs.standard.tag.rt.core.OutTag - JSP - - -Expression to be evaluated. - - value - true - true - - - -Default value if the resulting value is null. - - default - false - true - - - -Determines whether characters <,>,&,'," in the -resulting string should be converted to their -corresponding character entity codes. Default value is -true. - - escapeXml - false - true - - - - - - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - otherwise - org.apache.taglibs.standard.tag.common.core.OtherwiseTag - JSP - - - - - Adds a parameter to a containing 'import' tag's URL. - - param - org.apache.taglibs.standard.tag.rt.core.ParamTag - JSP - - -Name of the query string parameter. - - name - true - true - - - -Value of the parameter. - - value - false - true - - - - - - Redirects to a new URL. - - redirect - org.apache.taglibs.standard.tag.rt.core.RedirectTag - JSP - - -The URL of the resource to redirect to. - - url - false - true - - - -Name of the context when redirecting to a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Removes a scoped variable (from a particular scope, if specified). - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - -Name of the scoped variable to be removed. - - var - true - false - - - -Scope for var. - - scope - false - false - - - - - - Sets the result of an expression evaluation in a 'scope' - - set - org.apache.taglibs.standard.tag.rt.core.SetTag - JSP - - -Name of the exported scoped variable to hold the value -specified in the action. The type of the scoped variable is -whatever type the value expression evaluates to. - - var - false - false - - - -Expression to be evaluated. - - value - false - true - - - -Target object whose property will be set. Must evaluate to -a JavaBeans object with setter property property, or to a -java.util.Map object. - - target - false - true - - - -Name of the property to be set in the target object. - - property - false - true - - - -Scope for var. - - scope - false - false - - - - - - Creates a URL with optional query parameters. - - url - org.apache.taglibs.standard.tag.rt.core.UrlTag - JSP - - -Name of the exported scoped variable for the -processed url. The type of the scoped variable is -String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -URL to be processed. - - value - false - true - - - -Name of the context when specifying a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - when - org.apache.taglibs.standard.tag.rt.core.WhenTag - JSP - - -The test condition that determines whether or not the -body content should be processed. - - test - true - true - boolean - - - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/fn.tld b/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/fn.tld deleted file mode 100644 index 12d4ca8e..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/fn.tld +++ /dev/null @@ -1,207 +0,0 @@ - - - - - JSTL 1.1 functions library - JSTL functions - 1.1 - fn - http://java.sun.com/jsp/jstl/functions - - - - Tests if an input string contains the specified substring. - - contains - org.apache.taglibs.standard.functions.Functions - boolean contains(java.lang.String, java.lang.String) - - <c:if test="${fn:contains(name, searchString)}"> - - - - - - Tests if an input string contains the specified substring in a case insensitive way. - - containsIgnoreCase - org.apache.taglibs.standard.functions.Functions - boolean containsIgnoreCase(java.lang.String, java.lang.String) - - <c:if test="${fn:containsIgnoreCase(name, searchString)}"> - - - - - - Tests if an input string ends with the specified suffix. - - endsWith - org.apache.taglibs.standard.functions.Functions - boolean endsWith(java.lang.String, java.lang.String) - - <c:if test="${fn:endsWith(filename, ".txt")}"> - - - - - - Escapes characters that could be interpreted as XML markup. - - escapeXml - org.apache.taglibs.standard.functions.Functions - java.lang.String escapeXml(java.lang.String) - - ${fn:escapeXml(param:info)} - - - - - - Returns the index withing a string of the first occurrence of a specified substring. - - indexOf - org.apache.taglibs.standard.functions.Functions - int indexOf(java.lang.String, java.lang.String) - - ${fn:indexOf(name, "-")} - - - - - - Joins all elements of an array into a string. - - join - org.apache.taglibs.standard.functions.Functions - java.lang.String join(java.lang.String[], java.lang.String) - - ${fn:join(array, ";")} - - - - - - Returns the number of items in a collection, or the number of characters in a string. - - length - org.apache.taglibs.standard.functions.Functions - int length(java.lang.Object) - - You have ${fn:length(shoppingCart.products)} in your shopping cart. - - - - - - Returns a string resulting from replacing in an input string all occurrences - of a "before" string into an "after" substring. - - replace - org.apache.taglibs.standard.functions.Functions - java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) - - ${fn:replace(text, "-", "•")} - - - - - - Splits a string into an array of substrings. - - split - org.apache.taglibs.standard.functions.Functions - java.lang.String[] split(java.lang.String, java.lang.String) - - ${fn:split(customerNames, ";")} - - - - - - Tests if an input string starts with the specified prefix. - - startsWith - org.apache.taglibs.standard.functions.Functions - boolean startsWith(java.lang.String, java.lang.String) - - <c:if test="${fn:startsWith(product.id, "100-")}"> - - - - - - Returns a subset of a string. - - substring - org.apache.taglibs.standard.functions.Functions - java.lang.String substring(java.lang.String, int, int) - - P.O. Box: ${fn:substring(zip, 6, -1)} - - - - - - Returns a subset of a string following a specific substring. - - substringAfter - org.apache.taglibs.standard.functions.Functions - java.lang.String substringAfter(java.lang.String, java.lang.String) - - P.O. Box: ${fn:substringAfter(zip, "-")} - - - - - - Returns a subset of a string before a specific substring. - - substringBefore - org.apache.taglibs.standard.functions.Functions - java.lang.String substringBefore(java.lang.String, java.lang.String) - - Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} - - - - - - Converts all of the characters of a string to lower case. - - toLowerCase - org.apache.taglibs.standard.functions.Functions - java.lang.String toLowerCase(java.lang.String) - - Product name: ${fn.toLowerCase(product.name)} - - - - - - Converts all of the characters of a string to upper case. - - toUpperCase - org.apache.taglibs.standard.functions.Functions - java.lang.String toUpperCase(java.lang.String) - - Product name: ${fn.UpperCase(product.name)} - - - - - - Removes white spaces from both ends of a string. - - trim - org.apache.taglibs.standard.functions.Functions - java.lang.String trim(java.lang.String) - - Name: ${fn.trim(name)} - - - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/jstl-1.2.jar b/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/jstl-1.2.jar deleted file mode 100644 index 0fd275e9..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/jstl-1.2.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/standard.jar b/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/standard.jar deleted file mode 100644 index bc528acb..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/lib/standard.jar and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/web.xml b/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 40066892..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - connsec maxkey developers wiki - - - webAppRootKey - connsec.maxkey.wiki.root - - - - index.jsp - - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/css.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/css.jsp deleted file mode 100644 index 47f666f3..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/css.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/footer.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/footer.jsp deleted file mode 100644 index 37e9abee..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/footer.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -String lang = "zh_CN"; -if(request.getParameter("language")!=null){ - lang = request.getParameter("language"); -} -%> - -<% if(lang.equals("zh_CN")){%> - -
- + - - - -
- - - - - + + + " title="UserType" wurl="/usertype//selectUserTypeList" wwidth="700" wheight="500" />
- - - -
-
-
-<%} else { %> - - <%} %> \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/head.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/head.jsp deleted file mode 100644 index 1b3e40bf..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/head.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%String path = request.getContextPath(); -String lang = "zh_CN"; -if(request.getParameter("language")!=null){ - lang = request.getParameter("language"); -} -%> - - -<% if(lang.equals("zh_CN")){%> 应用集成开发指南 -<%}else{%>App Integration Develop Wiki<%}%> - - - - - - - - - - - - - \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left.jsp deleted file mode 100644 index 61d288e8..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> - -<% -String path = request.getContextPath(); -String lang = "zh_CN"; -if(request.getParameter("language")!=null){ - lang = request.getParameter("language"); -} -%> - -<% if(lang.equals("zh_CN")){%> - - - -<%} else { %> - - - -<%} %> - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_en.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_en.jsp deleted file mode 100644 index bd0c3ed0..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_en.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -<% -String path = request.getContextPath(); -%> - - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_zh.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_zh.jsp deleted file mode 100644 index 55256caa..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/left_zh.jsp +++ /dev/null @@ -1,155 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -<% -String path = request.getContextPath(); -%> - - -
- -
- diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/top.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/top.jsp deleted file mode 100644 index 7887a127..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/common/top.jsp +++ /dev/null @@ -1,31 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -String language="zh_CN"; -if(request.getParameter("language")!=null){ - language = request.getParameter("language"); -} -%> - -
-
- -
diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/base.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/base.css deleted file mode 100644 index 5c08b1bc..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/base.css +++ /dev/null @@ -1,34 +0,0 @@ -@charset "utf-8"; -/*base */ -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, p, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0px; - padding: 0px; - border: 0px none; - font-family: Arial, Helvetica, sans-serif, "宋体"; - vertical-align: baseline; -} -a { - text-decoration:none; -} -a img { - border: none -} -h1, h2, h3, h4, h5, h6 { - font-family:"微软雅黑"; - font-weight:bold; -} -.clear { - clear:both; -} -blockquote:before, blockquote:after, q:before, q:after { - content: "" -} -blockquote, q { - quotes: "" "" -} -ul li{ list-style:none;} -body { - background:url(../images/body-bg.gif) no-repeat #e2e2d9; - -} - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/bootstrap.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/bootstrap.css deleted file mode 100644 index 99d0f4ad..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/bootstrap.css +++ /dev/null @@ -1,6318 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; - line-height: 0; -} -.clearfix:after { - clear: both; -} -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.input-block-level { - display: block; - width: 100%; - min-height: 25px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} -audio:not([controls]) { - display: none; -} -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -a:hover, -a:active { - outline: 0; -} -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -img { - /* Responsive images (ensure images don't scale beyond their parents) */ - - max-width: 100%; - /* Part 1: Set a maxium relative to the parent */ - - width: auto\9; - /* IE7-8 need help adjusting responsive images */ - - height: auto; - /* Part 2: Scale the height according to the width, otherwise you get stretching */ - - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} -#map_canvas img, -.google-maps img { - max-width: none; -} -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} -button, -input { - *overflow: visible; - line-height: normal; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -label, -select, -button, -input[type="button"], -input[type="reset"], -input[type="submit"], -input[type="radio"], -input[type="checkbox"] { - cursor: pointer; -} -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} -textarea { - overflow: auto; - vertical-align: top; -} -@media print { - * { - text-shadow: none !important; - color: #000 !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - .ir a:after, - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 0.5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } -} -body { - margin: 0; - font-family: Verdana, Microsoft YaHei, SimSun, Arial, sans-serif; - font-size: 12px; - line-height: 15px; - color: #2e3337; - background-color: #ffffff; -} -a { - color: #730049; - text-decoration: none; -} -a:hover, -a:focus { - color: #730049; - text-decoration: underline; -} -.img-rounded { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.img-polaroid { - padding: 4px; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} -.img-circle { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} -.row { - margin-left: -8px; - *zoom: 1; -} -.row:before, -.row:after { - display: table; - content: ""; - line-height: 0; -} -.row:after { - clear: both; -} -[class*="span"] { - float: left; - min-height: 1px; - margin-left: 8px; -} -.container, -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 952px; -} -.span12 { - width: 952px; -} -.span11 { - width: 872px; -} -.span10 { - width: 792px; -} -.span9 { - width: 712px; -} -.span8 { - width: 632px; -} -.span7 { - width: 552px; -} -.span6 { - width: 472px; -} -.span5 { - width: 392px; -} -.span4 { - width: 312px; -} -.span3 { - width: 232px; -} -.span2 { - width: 152px; -} -.span1 { - width: 72px; -} -.offset12 { - margin-left: 968px; -} -.offset11 { - margin-left: 888px; -} -.offset10 { - margin-left: 808px; -} -.offset9 { - margin-left: 728px; -} -.offset8 { - margin-left: 648px; -} -.offset7 { - margin-left: 568px; -} -.offset6 { - margin-left: 488px; -} -.offset5 { - margin-left: 408px; -} -.offset4 { - margin-left: 328px; -} -.offset3 { - margin-left: 248px; -} -.offset2 { - margin-left: 168px; -} -.offset1 { - margin-left: 88px; -} -.row-fluid { - width: 100%; - *zoom: 1; -} -.row-fluid:before, -.row-fluid:after { - display: table; - content: ""; - line-height: 0; -} -.row-fluid:after { - clear: both; -} -.row-fluid [class*="span"] { - display: block; - width: 100%; - min-height: 25px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: left; - margin-left: 0.8403361344537815%; - *margin-left: 0.7878151260504201%; -} -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} -.row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 0.8403361344537815%; -} -.row-fluid .span12 { - width: 99.99999999999999%; - *width: 99.94747899159663%; -} -.row-fluid .span11 { - width: 91.59663865546219%; - *width: 91.54411764705883%; -} -.row-fluid .span10 { - width: 83.19327731092437%; - *width: 83.14075630252101%; -} -.row-fluid .span9 { - width: 74.78991596638656%; - *width: 74.7373949579832%; -} -.row-fluid .span8 { - width: 66.38655462184875%; - *width: 66.33403361344538%; -} -.row-fluid .span7 { - width: 57.98319327731092%; - *width: 57.93067226890756%; -} -.row-fluid .span6 { - width: 49.579831932773104%; - *width: 49.52731092436974%; -} -.row-fluid .span5 { - width: 41.1764705882353%; - *width: 41.12394957983194%; -} -.row-fluid .span4 { - width: 32.773109243697476%; - *width: 32.720588235294116%; -} -.row-fluid .span3 { - width: 24.369747899159663%; - *width: 24.317226890756302%; -} -.row-fluid .span2 { - width: 15.966386554621849%; - *width: 15.913865546218487%; -} -.row-fluid .span1 { - width: 7.563025210084033%; - *width: 7.510504201680672%; -} -.row-fluid .offset12 { - margin-left: 101.68067226890754%; - *margin-left: 101.57563025210082%; -} -.row-fluid .offset12:first-child { - margin-left: 100.84033613445376%; - *margin-left: 100.73529411764704%; -} -.row-fluid .offset11 { - margin-left: 93.27731092436974%; - *margin-left: 93.17226890756302%; -} -.row-fluid .offset11:first-child { - margin-left: 92.43697478991596%; - *margin-left: 92.33193277310924%; -} -.row-fluid .offset10 { - margin-left: 84.87394957983193%; - *margin-left: 84.76890756302521%; -} -.row-fluid .offset10:first-child { - margin-left: 84.03361344537815%; - *margin-left: 83.92857142857143%; -} -.row-fluid .offset9 { - margin-left: 76.47058823529412%; - *margin-left: 76.3655462184874%; -} -.row-fluid .offset9:first-child { - margin-left: 75.63025210084034%; - *margin-left: 75.52521008403362%; -} -.row-fluid .offset8 { - margin-left: 68.0672268907563%; - *margin-left: 67.96218487394958%; -} -.row-fluid .offset8:first-child { - margin-left: 67.22689075630252%; - *margin-left: 67.1218487394958%; -} -.row-fluid .offset7 { - margin-left: 59.66386554621848%; - *margin-left: 59.55882352941176%; -} -.row-fluid .offset7:first-child { - margin-left: 58.823529411764696%; - *margin-left: 58.718487394957975%; -} -.row-fluid .offset6 { - margin-left: 51.26050420168067%; - *margin-left: 51.15546218487395%; -} -.row-fluid .offset6:first-child { - margin-left: 50.42016806722688%; - *margin-left: 50.31512605042016%; -} -.row-fluid .offset5 { - margin-left: 42.85714285714286%; - *margin-left: 42.75210084033614%; -} -.row-fluid .offset5:first-child { - margin-left: 42.016806722689076%; - *margin-left: 41.911764705882355%; -} -.row-fluid .offset4 { - margin-left: 34.45378151260504%; - *margin-left: 34.34873949579832%; -} -.row-fluid .offset4:first-child { - margin-left: 33.613445378151255%; - *margin-left: 33.508403361344534%; -} -.row-fluid .offset3 { - margin-left: 26.050420168067227%; - *margin-left: 25.945378151260506%; -} -.row-fluid .offset3:first-child { - margin-left: 25.210084033613445%; - *margin-left: 25.105042016806724%; -} -.row-fluid .offset2 { - margin-left: 17.647058823529413%; - *margin-left: 17.54201680672269%; -} -.row-fluid .offset2:first-child { - margin-left: 16.80672268907563%; - *margin-left: 16.701680672268907%; -} -.row-fluid .offset1 { - margin-left: 9.243697478991596%; - *margin-left: 9.138655462184873%; -} -.row-fluid .offset1:first-child { - margin-left: 8.403361344537815%; - *margin-left: 8.298319327731091%; -} -[class*="span"].hide, -.row-fluid [class*="span"].hide { - display: none; -} -[class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { - float: right; -} -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} -.container:before, -.container:after { - display: table; - content: ""; - line-height: 0; -} -.container:after { - clear: both; -} -.container-fluid { - padding-right: 8px; - padding-left: 8px; - *zoom: 1; -} -.container-fluid:before, -.container-fluid:after { - display: table; - content: ""; - line-height: 0; -} -.container-fluid:after { - clear: both; -} -p { - margin: 0 0 7.5px; -} -.lead { - margin-bottom: 15px; - font-size: 18px; - font-weight: 200; - line-height: 22.5px; -} -small { - font-size: 85%; -} -strong { - font-weight: bold; -} -em { - font-style: italic; -} -cite { - font-style: normal; -} -.muted { - color: #999999; -} -a.muted:hover, -a.muted:focus { - color: #808080; -} -.text-warning { - color: #c09853; -} -a.text-warning:hover, -a.text-warning:focus { - color: #a47e3c; -} -.text-error { - color: #b94a48; -} -a.text-error:hover, -a.text-error:focus { - color: #953b39; -} -.text-info { - color: #3a87ad; -} -a.text-info:hover, -a.text-info:focus { - color: #2d6987; -} -.text-success { - color: #468847; -} -a.text-success:hover, -a.text-success:focus { - color: #356635; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 7.5px 0; - font-family: inherit; - font-weight: bold; - line-height: 15px; - color: inherit; - text-rendering: optimizelegibility; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} -h1, -h2, -h3 { - line-height: 30px; -} -h1 { - font-size: 33px; -} -h2 { - font-size: 27px; -} -h3 { - font-size: 21px; -} -h4 { - font-size: 15px; -} -h5 { - font-size: 12px; -} -h6 { - font-size: 10.2px; -} -h1 small { - font-size: 21px; -} -h2 small { - font-size: 15px; -} -h3 small { - font-size: 12px; -} -h4 small { - font-size: 12px; -} -.page-header { - padding-bottom: 6.5px; - margin: 15px 0 22.5px; - border-bottom: 1px solid #eeeeee; -} -ul, -ol { - padding: 0; - margin: 0 0 7.5px 25px; -} -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} -li { - line-height: 15px; -} -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} -ul.inline, -ol.inline { - margin-left: 0; - list-style: none; -} -ul.inline > li, -ol.inline > li { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - padding-left: 5px; - padding-right: 5px; -} -dl { - margin-bottom: 15px; -} -dt, -dd { - line-height: 15px; -} -dt { - font-weight: bold; -} -dd { - margin-left: 7.5px; -} -.dl-horizontal { - *zoom: 1; -} -.dl-horizontal:before, -.dl-horizontal:after { - display: table; - content: ""; - line-height: 0; -} -.dl-horizontal:after { - clear: both; -} -.dl-horizontal dt { - float: left; - width: 160px; - clear: left; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.dl-horizontal dd { - margin-left: 180px; -} -hr { - margin: 15px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 0 0 0 15px; - margin: 0 0 15px; - border-left: 5px solid #eeeeee; -} -blockquote p { - margin-bottom: 0; - font-size: 15px; - font-weight: 300; - line-height: 1.25; -} -blockquote small { - display: block; - line-height: 15px; - color: #999999; -} -blockquote small:before { - content: '\2014 \00A0'; -} -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} -blockquote.pull-right small:before { - content: ''; -} -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} -address { - display: block; - margin-bottom: 15px; - font-style: normal; - line-height: 15px; -} -code, -pre { - padding: 0 3px 2px; - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; - font-size: 10px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -code { - padding: 2px 4px; - color: #d14; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - white-space: nowrap; -} -pre { - display: block; - padding: 7px; - margin: 0 0 7.5px; - font-size: 11px; - line-height: 15px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -pre.prettyprint { - margin-bottom: 15px; -} -pre code { - padding: 0; - color: inherit; - white-space: pre; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.label, -.badge { - display: inline-block; - padding: 2px 4px; - font-size: 10.152px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - vertical-align: baseline; - white-space: nowrap; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #999999; -} -.label { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.badge { - padding-left: 9px; - padding-right: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} -.label:empty, -.badge:empty { - display: none; -} -a.label:hover, -a.label:focus, -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} -.label-important, -.badge-important { - background-color: #b94a48; -} -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} -.label-warning, -.badge-warning { - background-color: #dd6710; -} -.label-warning[href], -.badge-warning[href] { - background-color: #ad510d; -} -.label-success, -.badge-success { - background-color: #468847; -} -.label-success[href], -.badge-success[href] { - background-color: #356635; -} -.label-info, -.badge-info { - background-color: #3a87ad; -} -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} -.label-inverse, -.badge-inverse { - background-color: #333333; -} -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} -.btn .label, -.btn .badge { - position: relative; - top: -1px; -} -.btn-mini .label, -.btn-mini .badge { - top: 0; -} -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} -.table { - width: 100%; - margin-bottom: 15px; -} -.table th, -.table td { - padding: 8px; - line-height: 15px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} -.table th { - font-weight: bold; -} -.table thead th { - vertical-align: bottom; -} -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} -.table tbody + tbody { - border-top: 2px solid #dddddd; -} -.table .table { - background-color: #ffffff; -} -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} -.table-bordered thead:first-child tr:first-child > th:first-child, -.table-bordered tbody:first-child tr:first-child > td:first-child, -.table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 2px; - -moz-border-radius-topleft: 2px; - border-top-left-radius: 2px; -} -.table-bordered thead:first-child tr:first-child > th:last-child, -.table-bordered tbody:first-child tr:first-child > td:last-child, -.table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topright: 2px; - border-top-right-radius: 2px; -} -.table-bordered thead:last-child tr:last-child > th:first-child, -.table-bordered tbody:last-child tr:last-child > td:first-child, -.table-bordered tbody:last-child tr:last-child > th:first-child, -.table-bordered tfoot:last-child tr:last-child > td:first-child, -.table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - border-bottom-left-radius: 2px; -} -.table-bordered thead:last-child tr:last-child > th:last-child, -.table-bordered tbody:last-child tr:last-child > td:last-child, -.table-bordered tbody:last-child tr:last-child > th:last-child, -.table-bordered tfoot:last-child tr:last-child > td:last-child, -.table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - border-bottom-right-radius: 2px; -} -.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; - border-bottom-left-radius: 0; -} -.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; - border-bottom-right-radius: 0; -} -.table-bordered caption + thead tr:first-child th:first-child, -.table-bordered caption + tbody tr:first-child td:first-child, -.table-bordered colgroup + thead tr:first-child th:first-child, -.table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 2px; - -moz-border-radius-topleft: 2px; - border-top-left-radius: 2px; -} -.table-bordered caption + thead tr:first-child th:last-child, -.table-bordered caption + tbody tr:first-child td:last-child, -.table-bordered colgroup + thead tr:first-child th:last-child, -.table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topright: 2px; - border-top-right-radius: 2px; -} -.table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: #e0e1e3; -} -.table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: #f5f5f5; -} -table td[class*="span"], -table th[class*="span"], -.row-fluid table td[class*="span"], -.row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; -} -.table td.span1, -.table th.span1 { - float: none; - width: 56px; - margin-left: 0; -} -.table td.span2, -.table th.span2 { - float: none; - width: 136px; - margin-left: 0; -} -.table td.span3, -.table th.span3 { - float: none; - width: 216px; - margin-left: 0; -} -.table td.span4, -.table th.span4 { - float: none; - width: 296px; - margin-left: 0; -} -.table td.span5, -.table th.span5 { - float: none; - width: 376px; - margin-left: 0; -} -.table td.span6, -.table th.span6 { - float: none; - width: 456px; - margin-left: 0; -} -.table td.span7, -.table th.span7 { - float: none; - width: 536px; - margin-left: 0; -} -.table td.span8, -.table th.span8 { - float: none; - width: 616px; - margin-left: 0; -} -.table td.span9, -.table th.span9 { - float: none; - width: 696px; - margin-left: 0; -} -.table td.span10, -.table th.span10 { - float: none; - width: 776px; - margin-left: 0; -} -.table td.span11, -.table th.span11 { - float: none; - width: 856px; - margin-left: 0; -} -.table td.span12, -.table th.span12 { - float: none; - width: 936px; - margin-left: 0; -} -.table tbody tr.success > td { - background-color: #dff0d8; -} -.table tbody tr.error > td { - background-color: #f2dede; -} -.table tbody tr.warning > td { - background-color: #fcf8e3; -} -.table tbody tr.info > td { - background-color: #d9edf7; -} -.table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; -} -.table-hover tbody tr.error:hover > td { - background-color: #ebcccc; -} -.table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; -} -.table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; -} -form { - margin: 0 0 15px; -} -fieldset { - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 15px; - font-size: 18px; - line-height: 30px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -legend small { - font-size: 11.25px; - color: #999999; -} -label, -input, -button, -select, -textarea { - font-size: 12px; - font-weight: normal; - line-height: 15px; -} -input, -button, -select, -textarea { - font-family: Verdana, Microsoft YaHei, SimSun, Arial, sans-serif; -} -label { - display: block; - margin-bottom: 5px; -} -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - display: inline-block; - height: 15px; - padding: 4px 6px; - margin-bottom: 7.5px; - font-size: 12px; - line-height: 15px; - color: #555555; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - vertical-align: middle; -} -input, -textarea, -.uneditable-input { - width: 206px; -} -textarea { - height: auto; -} -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid #cccccc; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear .2s, box-shadow linear .2s; - -moz-transition: border linear .2s, box-shadow linear .2s; - -o-transition: border linear .2s, box-shadow linear .2s; - transition: border linear .2s, box-shadow linear .2s; -} -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - *margin-top: 0; - /* IE7 */ - - margin-top: 1px \9; - /* IE8-9 */ - - line-height: normal; -} -input[type="file"], -input[type="image"], -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} -select, -input[type="file"] { - height: 25px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 25px; -} -select { - width: 220px; - border: 1px solid #cccccc; - background-color: #ffffff; -} -select[multiple], -select[size] { - height: auto; -} -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.uneditable-input, -.uneditable-textarea { - color: #999999; - background-color: #fcfcfc; - border-color: #cccccc; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - cursor: not-allowed; -} -.uneditable-input { - overflow: hidden; - white-space: nowrap; -} -.uneditable-textarea { - width: auto; - height: auto; -} -input:-moz-placeholder, -textarea:-moz-placeholder { - color: #999999; -} -input:-ms-input-placeholder, -textarea:-ms-input-placeholder { - color: #999999; -} -input::-webkit-input-placeholder, -textarea::-webkit-input-placeholder { - color: #999999; -} -.radio, -.checkbox { - min-height: 15px; - padding-left: 20px; -} -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -20px; -} -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} -.input-mini { - width: 60px; -} -.input-small { - width: 90px; -} -.input-medium { - width: 150px; -} -.input-large { - width: 210px; -} -.input-xlarge { - width: 270px; -} -.input-xxlarge { - width: 530px; -} -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} -input, -textarea, -.uneditable-input { - margin-left: 0; -} -.controls-row [class*="span"] + [class*="span"] { - margin-left: 8px; -} -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 938px; -} -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 858px; -} -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 778px; -} -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 698px; -} -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 618px; -} -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 538px; -} -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 458px; -} -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 378px; -} -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 298px; -} -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 218px; -} -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 138px; -} -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 58px; -} -.controls-row { - *zoom: 1; -} -.controls-row:before, -.controls-row:after { - display: table; - content: ""; - line-height: 0; -} -.controls-row:after { - clear: both; -} -.controls-row [class*="span"], -.row-fluid .controls-row [class*="span"] { - float: left; -} -.controls-row .checkbox[class*="span"], -.controls-row .radio[class*="span"] { - padding-top: 5px; -} -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #f5f5f5; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} -.control-group.warning .control-label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; -} -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.control-group.warning input:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} -.control-group.error .control-label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - color: #b94a48; -} -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.control-group.error input:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} -.control-group.success .control-label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - color: #468847; -} -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.control-group.success input:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} -.control-group.info .control-label, -.control-group.info .help-block, -.control-group.info .help-inline { - color: #3a87ad; -} -.control-group.info .checkbox, -.control-group.info .radio, -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - color: #3a87ad; -} -.control-group.info input, -.control-group.info select, -.control-group.info textarea { - border-color: #3a87ad; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.control-group.info input:focus, -.control-group.info select:focus, -.control-group.info textarea:focus { - border-color: #2d6987; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -} -.control-group.info .input-prepend .add-on, -.control-group.info .input-append .add-on { - color: #3a87ad; - background-color: #d9edf7; - border-color: #3a87ad; -} -input:focus:invalid, -textarea:focus:invalid, -select:focus:invalid { - color: #b94a48; - border-color: #ee5f5b; -} -input:focus:invalid:focus, -textarea:focus:invalid:focus, -select:focus:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} -.form-actions { - padding: 14px 20px 15px; - margin-top: 15px; - margin-bottom: 15px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} -.form-actions:before, -.form-actions:after { - display: table; - content: ""; - line-height: 0; -} -.form-actions:after { - clear: both; -} -.help-block, -.help-inline { - color: #515a61; -} -.help-block { - display: block; - margin-bottom: 7.5px; -} -.help-inline { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - vertical-align: middle; - padding-left: 5px; -} -.input-append, -.input-prepend { - display: inline-block; - margin-bottom: 7.5px; - vertical-align: middle; - font-size: 0; - white-space: nowrap; -} -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input, -.input-append .dropdown-menu, -.input-prepend .dropdown-menu, -.input-append .popover, -.input-prepend .popover { - font-size: 12px; -} -.input-append input, -.input-prepend input, -.input-append select, -.input-prepend select, -.input-append .uneditable-input, -.input-prepend .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: top; - -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; -} -.input-append input:focus, -.input-prepend input:focus, -.input-append select:focus, -.input-prepend select:focus, -.input-append .uneditable-input:focus, -.input-prepend .uneditable-input:focus { - z-index: 2; -} -.input-append .add-on, -.input-prepend .add-on { - display: inline-block; - width: auto; - height: 15px; - min-width: 16px; - padding: 4px 5px; - font-size: 12px; - font-weight: normal; - line-height: 15px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; - border: 1px solid #ccc; -} -.input-append .add-on, -.input-prepend .add-on, -.input-append .btn, -.input-prepend .btn, -.input-append .btn-group > .dropdown-toggle, -.input-prepend .btn-group > .dropdown-toggle { - vertical-align: top; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.input-append .active, -.input-prepend .active { - background-color: #00ffff; - border-color: #006666; -} -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 2px 0 0 2px; - -moz-border-radius: 2px 0 0 2px; - border-radius: 2px 0 0 2px; -} -.input-append input, -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 2px 0 0 2px; - -moz-border-radius: 2px 0 0 2px; - border-radius: 2px 0 0 2px; -} -.input-append input + .btn-group .btn:last-child, -.input-append select + .btn-group .btn:last-child, -.input-append .uneditable-input + .btn-group .btn:last-child { - -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; -} -.input-append .add-on, -.input-append .btn, -.input-append .btn-group { - margin-left: -1px; -} -.input-append .add-on:last-child, -.input-append .btn:last-child, -.input-append .btn-group:last-child > .dropdown-toggle { - -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; -} -.input-prepend.input-append input, -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.input-prepend.input-append input + .btn-group .btn, -.input-prepend.input-append select + .btn-group .btn, -.input-prepend.input-append .uneditable-input + .btn-group .btn { - -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; -} -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 2px 0 0 2px; - -moz-border-radius: 2px 0 0 2px; - border-radius: 2px 0 0 2px; -} -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; -} -.input-prepend.input-append .btn-group:first-child { - margin-left: 0; -} -input.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} -/* Allow for input prepend/append in search forms */ -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.form-search .input-append .search-query { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} -.form-search .input-append .btn { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} -.form-search .input-prepend .search-query { - -webkit-border-radius: 0 14px 14px 0; - -moz-border-radius: 0 14px 14px 0; - border-radius: 0 14px 14px 0; -} -.form-search .input-prepend .btn { - -webkit-border-radius: 14px 0 0 14px; - -moz-border-radius: 14px 0 0 14px; - border-radius: 14px 0 0 14px; -} -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - margin-bottom: 0; - vertical-align: middle; -} -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} -.form-search label, -.form-inline label, -.form-search .btn-group, -.form-inline .btn-group { - display: inline-block; -} -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} -.control-group { - margin-bottom: 7.5px; -} -legend + .control-group { - margin-top: 15px; - -webkit-margin-top-collapse: separate; -} -.form-horizontal .control-group { - margin-bottom: 15px; - *zoom: 1; -} -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - content: ""; - line-height: 0; -} -.form-horizontal .control-group:after { - clear: both; -} -.form-horizontal .control-label { - float: left; - width: 160px; - padding-top: 5px; - text-align: right; -} -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 180px; - *margin-left: 0; -} -.form-horizontal .controls:first-child { - *padding-left: 180px; -} -.form-horizontal .help-block { - margin-bottom: 0; -} -.form-horizontal input + .help-block, -.form-horizontal select + .help-block, -.form-horizontal textarea + .help-block, -.form-horizontal .uneditable-input + .help-block, -.form-horizontal .input-prepend + .help-block, -.form-horizontal .input-append + .help-block { - margin-top: 7.5px; -} -.form-horizontal .form-actions { - padding-left: 180px; -} -.btn { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - padding: 4px 12px; - margin-bottom: 0; - font-size: 12px; - line-height: 15px; - text-align: center; - vertical-align: middle; - cursor: pointer; - color: #333333; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - background-color: #f5f5f5; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #e6e6e6; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - border: 1px solid #cccccc; - *border: 0; - border-bottom-color: #b3b3b3; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - *margin-left: .3em; - -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -} -.btn:hover, -.btn:focus, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} -.btn:active, -.btn.active { - background-color: #cccccc \9; -} -.btn:first-child { - *margin-left: 0; -} -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn.active, -.btn:active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -} -.btn.disabled, -.btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn-large { - padding: 11px 19px; - font-size: 15px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.btn-large [class^="icon-"], -.btn-large [class*=" icon-"] { - margin-top: 4px; -} -.btn-small { - padding: 2px 10px; - font-size: 10.2px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.btn-small [class^="icon-"], -.btn-small [class*=" icon-"] { - margin-top: 0; -} -.btn-mini [class^="icon-"], -.btn-mini [class*=" icon-"] { - margin-top: -1px; -} -.btn-mini { - padding: 0 6px; - font-size: 9px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.btn-block { - display: block; - width: 100%; - padding-left: 0; - padding-right: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #73003a; - background-image: -moz-linear-gradient(top, #730049, #730023); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#730049), to(#730023)); - background-image: -webkit-linear-gradient(top, #730049, #730023); - background-image: -o-linear-gradient(top, #730049, #730023); - background-image: linear-gradient(to bottom, #730049, #730023); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff730049', endColorstr='#ff730023', GradientType=0); - border-color: #730023 #730023 #27000c; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #730023; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - color: #ffffff; - background-color: #730023; - *background-color: #5a001b; -} -.btn-primary:active, -.btn-primary.active { - background-color: #400013 \9; -} -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #e98031; - background-image: -moz-linear-gradient(top, #f29048, #dd6710); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f29048), to(#dd6710)); - background-image: -webkit-linear-gradient(top, #f29048, #dd6710); - background-image: -o-linear-gradient(top, #f29048, #dd6710); - background-image: linear-gradient(to bottom, #f29048, #dd6710); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff29048', endColorstr='#ffdd6710', GradientType=0); - border-color: #dd6710 #dd6710 #96460b; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #dd6710; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #dd6710; - *background-color: #c55c0e; -} -.btn-warning:active, -.btn-warning.active { - background-color: #ad510d \9; -} -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #bd362f; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #51a351; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #2f96b4; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #222222; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.btn-inverse:hover, -.btn-inverse:focus, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} -button.btn, -input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; -} -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} -.btn-link, -.btn-link:active, -.btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn-link { - border-color: transparent; - cursor: pointer; - color: #730049; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.btn-link:hover, -.btn-link:focus { - color: #730049; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -.btn-link[disabled]:focus { - color: #333333; - text-decoration: none; -} -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("../img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; - margin-top: 1px; -} -/* White icons with optional class, or on hover/focus/active states of certain elements */ -.icon-white, -.nav-pills > .active > a > [class^="icon-"], -.nav-pills > .active > a > [class*=" icon-"], -.nav-list > .active > a > [class^="icon-"], -.nav-list > .active > a > [class*=" icon-"], -.navbar-inverse .nav > .active > a > [class^="icon-"], -.navbar-inverse .nav > .active > a > [class*=" icon-"], -.dropdown-menu > li > a:hover > [class^="icon-"], -.dropdown-menu > li > a:focus > [class^="icon-"], -.dropdown-menu > li > a:hover > [class*=" icon-"], -.dropdown-menu > li > a:focus > [class*=" icon-"], -.dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"], -.dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:focus > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"], -.dropdown-submenu:focus > a > [class*=" icon-"] { - background-image: url("../img/glyphicons-halflings-white.png"); -} -.icon-glass { - background-position: 0 0; -} -.icon-music { - background-position: -24px 0; -} -.icon-search { - background-position: -48px 0; -} -.icon-envelope { - background-position: -72px 0; -} -.icon-heart { - background-position: -96px 0; -} -.icon-star { - background-position: -120px 0; -} -.icon-star-empty { - background-position: -144px 0; -} -.icon-user { - background-position: -168px 0; -} -.icon-film { - background-position: -192px 0; -} -.icon-th-large { - background-position: -216px 0; -} -.icon-th { - background-position: -240px 0; -} -.icon-th-list { - background-position: -264px 0; -} -.icon-ok { - background-position: -288px 0; -} -.icon-remove { - background-position: -312px 0; -} -.icon-zoom-in { - background-position: -336px 0; -} -.icon-zoom-out { - background-position: -360px 0; -} -.icon-off { - background-position: -384px 0; -} -.icon-signal { - background-position: -408px 0; -} -.icon-cog { - background-position: -432px 0; -} -.icon-trash { - background-position: -456px 0; -} -.icon-home { - background-position: 0 -24px; -} -.icon-file { - background-position: -24px -24px; -} -.icon-time { - background-position: -48px -24px; -} -.icon-road { - background-position: -72px -24px; -} -.icon-download-alt { - background-position: -96px -24px; -} -.icon-download { - background-position: -120px -24px; -} -.icon-upload { - background-position: -144px -24px; -} -.icon-inbox { - background-position: -168px -24px; -} -.icon-play-circle { - background-position: -192px -24px; -} -.icon-repeat { - background-position: -216px -24px; -} -.icon-refresh { - background-position: -240px -24px; -} -.icon-list-alt { - background-position: -264px -24px; -} -.icon-lock { - background-position: -287px -24px; -} -.icon-flag { - background-position: -312px -24px; -} -.icon-headphones { - background-position: -336px -24px; -} -.icon-volume-off { - background-position: -360px -24px; -} -.icon-volume-down { - background-position: -384px -24px; -} -.icon-volume-up { - background-position: -408px -24px; -} -.icon-qrcode { - background-position: -432px -24px; -} -.icon-barcode { - background-position: -456px -24px; -} -.icon-tag { - background-position: 0 -48px; -} -.icon-tags { - background-position: -25px -48px; -} -.icon-book { - background-position: -48px -48px; -} -.icon-bookmark { - background-position: -72px -48px; -} -.icon-print { - background-position: -96px -48px; -} -.icon-camera { - background-position: -120px -48px; -} -.icon-font { - background-position: -144px -48px; -} -.icon-bold { - background-position: -167px -48px; -} -.icon-italic { - background-position: -192px -48px; -} -.icon-text-height { - background-position: -216px -48px; -} -.icon-text-width { - background-position: -240px -48px; -} -.icon-align-left { - background-position: -264px -48px; -} -.icon-align-center { - background-position: -288px -48px; -} -.icon-align-right { - background-position: -312px -48px; -} -.icon-align-justify { - background-position: -336px -48px; -} -.icon-list { - background-position: -360px -48px; -} -.icon-indent-left { - background-position: -384px -48px; -} -.icon-indent-right { - background-position: -408px -48px; -} -.icon-facetime-video { - background-position: -432px -48px; -} -.icon-picture { - background-position: -456px -48px; -} -.icon-pencil { - background-position: 0 -72px; -} -.icon-map-marker { - background-position: -24px -72px; -} -.icon-adjust { - background-position: -48px -72px; -} -.icon-tint { - background-position: -72px -72px; -} -.icon-edit { - background-position: -96px -72px; -} -.icon-share { - background-position: -120px -72px; -} -.icon-check { - background-position: -144px -72px; -} -.icon-move { - background-position: -168px -72px; -} -.icon-step-backward { - background-position: -192px -72px; -} -.icon-fast-backward { - background-position: -216px -72px; -} -.icon-backward { - background-position: -240px -72px; -} -.icon-play { - background-position: -264px -72px; -} -.icon-pause { - background-position: -288px -72px; -} -.icon-stop { - background-position: -312px -72px; -} -.icon-forward { - background-position: -336px -72px; -} -.icon-fast-forward { - background-position: -360px -72px; -} -.icon-step-forward { - background-position: -384px -72px; -} -.icon-eject { - background-position: -408px -72px; -} -.icon-chevron-left { - background-position: -432px -72px; -} -.icon-chevron-right { - background-position: -456px -72px; -} -.icon-plus-sign { - background-position: 0 -96px; -} -.icon-minus-sign { - background-position: -24px -96px; -} -.icon-remove-sign { - background-position: -48px -96px; -} -.icon-ok-sign { - background-position: -72px -96px; -} -.icon-question-sign { - background-position: -96px -96px; -} -.icon-info-sign { - background-position: -120px -96px; -} -.icon-screenshot { - background-position: -144px -96px; -} -.icon-remove-circle { - background-position: -168px -96px; -} -.icon-ok-circle { - background-position: -192px -96px; -} -.icon-ban-circle { - background-position: -216px -96px; -} -.icon-arrow-left { - background-position: -240px -96px; -} -.icon-arrow-right { - background-position: -264px -96px; -} -.icon-arrow-up { - background-position: -289px -96px; -} -.icon-arrow-down { - background-position: -312px -96px; -} -.icon-share-alt { - background-position: -336px -96px; -} -.icon-resize-full { - background-position: -360px -96px; -} -.icon-resize-small { - background-position: -384px -96px; -} -.icon-plus { - background-position: -408px -96px; -} -.icon-minus { - background-position: -433px -96px; -} -.icon-asterisk { - background-position: -456px -96px; -} -.icon-exclamation-sign { - background-position: 0 -120px; -} -.icon-gift { - background-position: -24px -120px; -} -.icon-leaf { - background-position: -48px -120px; -} -.icon-fire { - background-position: -72px -120px; -} -.icon-eye-open { - background-position: -96px -120px; -} -.icon-eye-close { - background-position: -120px -120px; -} -.icon-warning-sign { - background-position: -144px -120px; -} -.icon-plane { - background-position: -168px -120px; -} -.icon-calendar { - background-position: -192px -120px; -} -.icon-random { - background-position: -216px -120px; - width: 16px; -} -.icon-comment { - background-position: -240px -120px; -} -.icon-magnet { - background-position: -264px -120px; -} -.icon-chevron-up { - background-position: -288px -120px; -} -.icon-chevron-down { - background-position: -313px -119px; -} -.icon-retweet { - background-position: -336px -120px; -} -.icon-shopping-cart { - background-position: -360px -120px; -} -.icon-folder-close { - background-position: -384px -120px; - width: 16px; -} -.icon-folder-open { - background-position: -408px -120px; - width: 16px; -} -.icon-resize-vertical { - background-position: -432px -119px; -} -.icon-resize-horizontal { - background-position: -456px -118px; -} -.icon-hdd { - background-position: 0 -144px; -} -.icon-bullhorn { - background-position: -24px -144px; -} -.icon-bell { - background-position: -48px -144px; -} -.icon-certificate { - background-position: -72px -144px; -} -.icon-thumbs-up { - background-position: -96px -144px; -} -.icon-thumbs-down { - background-position: -120px -144px; -} -.icon-hand-right { - background-position: -144px -144px; -} -.icon-hand-left { - background-position: -168px -144px; -} -.icon-hand-up { - background-position: -192px -144px; -} -.icon-hand-down { - background-position: -216px -144px; -} -.icon-circle-arrow-right { - background-position: -240px -144px; -} -.icon-circle-arrow-left { - background-position: -264px -144px; -} -.icon-circle-arrow-up { - background-position: -288px -144px; -} -.icon-circle-arrow-down { - background-position: -312px -144px; -} -.icon-globe { - background-position: -336px -144px; -} -.icon-wrench { - background-position: -360px -144px; -} -.icon-tasks { - background-position: -384px -144px; -} -.icon-filter { - background-position: -408px -144px; -} -.icon-briefcase { - background-position: -432px -144px; -} -.icon-fullscreen { - background-position: -456px -144px; -} -.btn-group { - position: relative; - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - font-size: 0; - vertical-align: middle; - white-space: nowrap; - *margin-left: .3em; -} -.btn-group:first-child { - *margin-left: 0; -} -.btn-group + .btn-group { - margin-left: 5px; -} -.btn-toolbar { - font-size: 0; - margin-top: 7.5px; - margin-bottom: 7.5px; -} -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group { - margin-left: 5px; -} -.btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.btn-group > .btn + .btn { - margin-left: -1px; -} -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 12px; -} -.btn-group > .btn-mini { - font-size: 9px; -} -.btn-group > .btn-small { - font-size: 10.2px; -} -.btn-group > .btn-large { - font-size: 15px; -} -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 2px; - -moz-border-radius-topleft: 2px; - border-top-left-radius: 2px; - -webkit-border-bottom-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - border-bottom-left-radius: 2px; -} -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topright: 2px; - border-top-right-radius: 2px; - -webkit-border-bottom-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - border-bottom-right-radius: 2px; -} -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; -} -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - *padding-top: 5px; - *padding-bottom: 5px; -} -.btn-group > .btn-mini + .dropdown-toggle { - padding-left: 5px; - padding-right: 5px; - *padding-top: 2px; - *padding-bottom: 2px; -} -.btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; -} -.btn-group > .btn-large + .dropdown-toggle { - padding-left: 12px; - padding-right: 12px; - *padding-top: 7px; - *padding-bottom: 7px; -} -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); - box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -} -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #730023; -} -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #dd6710; -} -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} -.btn .caret { - margin-top: 8px; - margin-left: 0; -} -.btn-large .caret { - margin-top: 6px; -} -.btn-large .caret { - border-left-width: 5px; - border-right-width: 5px; - border-top-width: 5px; -} -.btn-mini .caret, -.btn-small .caret { - margin-top: 8px; -} -.dropup .btn-large .caret { - border-bottom-width: 5px; -} -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -.btn-group-vertical { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} -.btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.btn-group-vertical > .btn + .btn { - margin-left: 0; - margin-top: -1px; -} -.btn-group-vertical > .btn:first-child { - -webkit-border-radius: 2px 2px 0 0; - -moz-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; -} -.btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 2px 2px; - -moz-border-radius: 0 0 2px 2px; - border-radius: 0 0 2px 2px; -} -.btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} -.nav { - margin-left: 0; - margin-bottom: 15px; - list-style: none; -} -.nav > li > a { - display: block; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} -.nav > li > a > img { - max-width: none; -} -.nav > .pull-right { - float: right; -} -.nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 15px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} -.nav li + .nav-header { - margin-top: 9px; -} -.nav-list { - padding-left: 15px; - padding-right: 15px; - margin-bottom: 0; -} -.nav-list > li > a, -.nav-list .nav-header { - margin-left: -15px; - margin-right: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} -.nav-list > li > a { - padding: 3px 15px; -} -.nav-list > .active > a, -.nav-list > .active > a:hover, -.nav-list > .active > a:focus { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #730049; -} -.nav-list [class^="icon-"], -.nav-list [class*=" icon-"] { - margin-right: 2px; -} -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 6.5px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} -.nav-tabs, -.nav-pills { - *zoom: 1; -} -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - content: ""; - line-height: 0; -} -.nav-tabs:after, -.nav-pills:after { - clear: both; -} -.nav-tabs > li, -.nav-pills > li { - float: left; -} -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - margin-bottom: -1px; -} -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 15px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover, -.nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #dddddd; -} -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover, -.nav-tabs > .active > a:focus { - color: #555555; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; -} -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.nav-pills > .active > a, -.nav-pills > .active > a:hover, -.nav-pills > .active > a:focus { - color: #ffffff; - background-color: #730049; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li > a { - margin-right: 0; -} -.nav-tabs.nav-stacked { - border-bottom: 0; -} -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; -} -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.nav-tabs.nav-stacked > li > a:hover, -.nav-tabs.nav-stacked > li > a:focus { - border-color: #ddd; - z-index: 2; -} -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} -.nav-pills .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.nav .dropdown-toggle .caret { - border-top-color: #730049; - border-bottom-color: #730049; - margin-top: 6px; -} -.nav .dropdown-toggle:hover .caret, -.nav .dropdown-toggle:focus .caret { - border-top-color: #730049; - border-bottom-color: #730049; -} -/* move down carets for tabs */ -.nav-tabs .dropdown-toggle .caret { - margin-top: 8px; -} -.nav .active .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} -.nav > .dropdown.active > a:hover, -.nav > .dropdown.active > a:focus { - cursor: pointer; -} -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover, -.nav > li.dropdown.open.active > a:focus { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret, -.nav li.dropdown.open a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} -.tabs-stacked .open > a:hover, -.tabs-stacked .open > a:focus { - border-color: #999999; -} -.tabbable { - *zoom: 1; -} -.tabbable:before, -.tabbable:after { - display: table; - content: ""; - line-height: 0; -} -.tabbable:after { - clear: both; -} -.tab-content { - overflow: auto; -} -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} -.tab-content > .active, -.pill-content > .active { - display: block; -} -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} -.tabs-below > .nav-tabs > li > a:hover, -.tabs-below > .nav-tabs > li > a:focus { - border-bottom-color: transparent; - border-top-color: #ddd; -} -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover, -.tabs-below > .nav-tabs > .active > a:focus { - border-color: transparent #ddd #ddd #ddd; -} -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} -.tabs-left > .nav-tabs > li > a:hover, -.tabs-left > .nav-tabs > li > a:focus { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover, -.tabs-left > .nav-tabs .active > a:focus { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} -.tabs-right > .nav-tabs > li > a:hover, -.tabs-right > .nav-tabs > li > a:focus { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover, -.tabs-right > .nav-tabs .active > a:focus { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} -.nav > .disabled > a { - color: #999999; -} -.nav > .disabled > a:hover, -.nav > .disabled > a:focus { - text-decoration: none; - background-color: transparent; - cursor: default; -} -.navbar { - overflow: visible; - margin-bottom: 15px; - *position: relative; - *z-index: 2; -} -.navbar-inner { - min-height: 40px; - padding-left: 20px; - padding-right: 20px; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - border: 1px solid #d4d4d4; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - *zoom: 1; -} -.navbar-inner:before, -.navbar-inner:after { - display: table; - content: ""; - line-height: 0; -} -.navbar-inner:after { - clear: both; -} -.navbar .container { - width: auto; -} -.nav-collapse.collapse { - height: auto; - overflow: visible; -} -.navbar .brand { - float: left; - display: block; - padding: 12.5px 20px 12.5px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #777777; - text-shadow: 0 1px 0 #ffffff; -} -.navbar .brand:hover, -.navbar .brand:focus { - text-decoration: none; -} -.navbar-text { - margin-bottom: 0; - line-height: 40px; - color: #777777; -} -.navbar-link { - color: #777777; -} -.navbar-link:hover, -.navbar-link:focus { - color: #333333; -} -.navbar .divider-vertical { - height: 40px; - margin: 0 9px; - border-left: 1px solid #f2f2f2; - border-right: 1px solid #ffffff; -} -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} -.navbar .btn-group .btn, -.navbar .input-prepend .btn, -.navbar .input-append .btn, -.navbar .input-prepend .btn-group, -.navbar .input-append .btn-group { - margin-top: 0; -} -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} -.navbar-form:before, -.navbar-form:after { - display: table; - content: ""; - line-height: 0; -} -.navbar-form:after { - clear: both; -} -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} -.navbar-form input, -.navbar-form select, -.navbar-form .btn { - display: inline-block; - margin-bottom: 0; -} -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 5px; - white-space: nowrap; -} -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} -.navbar-search { - position: relative; - float: left; - margin-top: 5px; - margin-bottom: 0; -} -.navbar-search .search-query { - margin-bottom: 0; - padding: 4px 14px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} -.navbar-static-top { - position: static; - margin-bottom: 0; -} -.navbar-static-top .navbar-inner { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - border-width: 0 0 1px; -} -.navbar-fixed-bottom .navbar-inner { - border-width: 1px 0 0; -} -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-left: 0; - padding-right: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.navbar-static-top .container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 952px; -} -.navbar-fixed-top { - top: 0; -} -.navbar-fixed-top .navbar-inner, -.navbar-static-top .navbar-inner { - -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); - -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); - box-shadow: 0 1px 10px rgba(0,0,0,.1); -} -.navbar-fixed-bottom { - bottom: 0; -} -.navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); - -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); - box-shadow: 0 -1px 10px rgba(0,0,0,.1); -} -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} -.navbar .nav.pull-right { - float: right; - margin-right: 0; -} -.navbar .nav > li { - float: left; -} -.navbar .nav > li > a { - float: none; - padding: 12.5px 15px 12.5px; - color: #777777; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; -} -.navbar .nav .dropdown-toggle .caret { - margin-top: 8px; -} -.navbar .nav > li > a:focus, -.navbar .nav > li > a:hover { - background-color: transparent; - color: #333333; - text-decoration: none; -} -.navbar .nav > .active > a, -.navbar .nav > .active > a:hover, -.navbar .nav > .active > a:focus { - color: #555555; - text-decoration: none; - background-color: #e5e5e5; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-left: 5px; - margin-right: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #ededed; - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); - background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); - background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - border-color: #e5e5e5 #e5e5e5 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #e5e5e5; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); - -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); - box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); -} -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - color: #ffffff; - background-color: #e5e5e5; - *background-color: #d9d9d9; -} -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #cccccc \9; -} -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} -.navbar .nav > li > .dropdown-menu:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-bottom-color: rgba(0, 0, 0, 0.2); - position: absolute; - top: -7px; - left: 9px; -} -.navbar .nav > li > .dropdown-menu:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - position: absolute; - top: -6px; - left: 10px; -} -.navbar-fixed-bottom .nav > li > .dropdown-menu:before { - border-top: 7px solid #ccc; - border-top-color: rgba(0, 0, 0, 0.2); - border-bottom: 0; - bottom: -7px; - top: auto; -} -.navbar-fixed-bottom .nav > li > .dropdown-menu:after { - border-top: 6px solid #ffffff; - border-bottom: 0; - bottom: -6px; - top: auto; -} -.navbar .nav li.dropdown > a:hover .caret, -.navbar .nav li.dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - background-color: #e5e5e5; - color: #555555; -} -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} -.navbar .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} -.navbar .pull-right > li > .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right { - left: auto; - right: 0; -} -.navbar .pull-right > li > .dropdown-menu:before, -.navbar .nav > li > .dropdown-menu.pull-right:before { - left: auto; - right: 12px; -} -.navbar .pull-right > li > .dropdown-menu:after, -.navbar .nav > li > .dropdown-menu.pull-right:after { - left: auto; - right: 13px; -} -.navbar .pull-right > li > .dropdown-menu .dropdown-menu, -.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { - left: auto; - right: 100%; - margin-left: 0; - margin-right: -1px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} -.navbar-inverse .navbar-inner { - background-color: #1b1b1b; - background-image: -moz-linear-gradient(top, #222222, #111111); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); - background-image: -webkit-linear-gradient(top, #222222, #111111); - background-image: -o-linear-gradient(top, #222222, #111111); - background-image: linear-gradient(to bottom, #222222, #111111); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); - border-color: #252525; -} -.navbar-inverse .brand, -.navbar-inverse .nav > li > a { - color: #999999; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} -.navbar-inverse .brand:hover, -.navbar-inverse .nav > li > a:hover, -.navbar-inverse .brand:focus, -.navbar-inverse .nav > li > a:focus { - color: #ffffff; -} -.navbar-inverse .brand { - color: #999999; -} -.navbar-inverse .navbar-text { - color: #999999; -} -.navbar-inverse .nav > li > a:focus, -.navbar-inverse .nav > li > a:hover { - background-color: transparent; - color: #ffffff; -} -.navbar-inverse .nav .active > a, -.navbar-inverse .nav .active > a:hover, -.navbar-inverse .nav .active > a:focus { - color: #ffffff; - background-color: #111111; -} -.navbar-inverse .navbar-link { - color: #999999; -} -.navbar-inverse .navbar-link:hover, -.navbar-inverse .navbar-link:focus { - color: #ffffff; -} -.navbar-inverse .divider-vertical { - border-left-color: #111111; - border-right-color: #222222; -} -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - background-color: #111111; - color: #ffffff; -} -.navbar-inverse .nav li.dropdown > a:hover .caret, -.navbar-inverse .nav li.dropdown > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} -.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, -.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -.navbar-inverse .navbar-search .search-query { - color: #ffffff; - background-color: #515151; - border-color: #111111; - -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); - -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); - box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; -} -.navbar-inverse .navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} -.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} -.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} -.navbar-inverse .navbar-search .search-query:focus, -.navbar-inverse .navbar-search .search-query.focused { - padding: 5px 15px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - outline: 0; -} -.navbar-inverse .btn-navbar { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e0e0e; - background-image: -moz-linear-gradient(top, #151515, #040404); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); - background-image: -webkit-linear-gradient(top, #151515, #040404); - background-image: -o-linear-gradient(top, #151515, #040404); - background-image: linear-gradient(to bottom, #151515, #040404); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - border-color: #040404 #040404 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #040404; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.navbar-inverse .btn-navbar:hover, -.navbar-inverse .btn-navbar:focus, -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active, -.navbar-inverse .btn-navbar.disabled, -.navbar-inverse .btn-navbar[disabled] { - color: #ffffff; - background-color: #040404; - *background-color: #000000; -} -.navbar-inverse .btn-navbar:active, -.navbar-inverse .btn-navbar.active { - background-color: #000000 \9; -} -.breadcrumb { - padding: 8px 15px; - margin: 0 0 15px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.breadcrumb > li { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - text-shadow: 0 1px 0 #ffffff; -} -.breadcrumb > li > .divider { - padding: 0 5px; - color: #ccc; -} -.breadcrumb > .active { - color: #999999; -} -.pagination { - margin: 15px 0; -} -.pagination ul { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - margin-left: 0; - margin-bottom: 0; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} -.pagination ul > li { - display: inline; -} -.pagination ul > li > a, -.pagination ul > li > span { - float: left; - padding: 4px 12px; - line-height: 15px; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} -.pagination ul > li > a:hover, -.pagination ul > li > a:focus, -.pagination ul > .active > a, -.pagination ul > .active > span { - background-color: #f5f5f5; -} -.pagination ul > .active > a, -.pagination ul > .active > span { - color: #999999; - cursor: default; -} -.pagination ul > .disabled > span, -.pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover, -.pagination ul > .disabled > a:focus { - color: #999999; - background-color: transparent; - cursor: default; -} -.pagination ul > li:first-child > a, -.pagination ul > li:first-child > span { - border-left-width: 1px; - -webkit-border-top-left-radius: 2px; - -moz-border-radius-topleft: 2px; - border-top-left-radius: 2px; - -webkit-border-bottom-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - border-bottom-left-radius: 2px; -} -.pagination ul > li:last-child > a, -.pagination ul > li:last-child > span { - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topright: 2px; - border-top-right-radius: 2px; - -webkit-border-bottom-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - border-bottom-right-radius: 2px; -} -.pagination-centered { - text-align: center; -} -.pagination-right { - text-align: right; -} -.pagination-large ul > li > a, -.pagination-large ul > li > span { - padding: 11px 19px; - font-size: 15px; -} -.pagination-large ul > li:first-child > a, -.pagination-large ul > li:first-child > span { - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.pagination-large ul > li:last-child > a, -.pagination-large ul > li:last-child > span { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; -} -.pagination-mini ul > li:first-child > a, -.pagination-small ul > li:first-child > a, -.pagination-mini ul > li:first-child > span, -.pagination-small ul > li:first-child > span { - -webkit-border-top-left-radius: 2px; - -moz-border-radius-topleft: 2px; - border-top-left-radius: 2px; - -webkit-border-bottom-left-radius: 2px; - -moz-border-radius-bottomleft: 2px; - border-bottom-left-radius: 2px; -} -.pagination-mini ul > li:last-child > a, -.pagination-small ul > li:last-child > a, -.pagination-mini ul > li:last-child > span, -.pagination-small ul > li:last-child > span { - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topright: 2px; - border-top-right-radius: 2px; - -webkit-border-bottom-right-radius: 2px; - -moz-border-radius-bottomright: 2px; - border-bottom-right-radius: 2px; -} -.pagination-small ul > li > a, -.pagination-small ul > li > span { - padding: 2px 10px; - font-size: 10.2px; -} -.pagination-mini ul > li > a, -.pagination-mini ul > li > span { - padding: 0 6px; - font-size: 9px; -} -.pager { - margin: 15px 0; - list-style: none; - text-align: center; - *zoom: 1; -} -.pager:before, -.pager:after { - display: table; - content: ""; - line-height: 0; -} -.pager:after { - clear: both; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - background-color: #fff; - cursor: default; -} -.thumbnails { - margin-left: -8px; - list-style: none; - *zoom: 1; -} -.thumbnails:before, -.thumbnails:after { - display: table; - content: ""; - line-height: 0; -} -.thumbnails:after { - clear: both; -} -.row-fluid .thumbnails { - margin-left: 0; -} -.thumbnails > li { - float: left; - margin-bottom: 15px; - margin-left: 8px; -} -.thumbnail { - display: block; - padding: 4px; - line-height: 15px; - border: 1px solid #ddd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #730049; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} -.thumbnail > img { - display: block; - max-width: 100%; - margin-left: auto; - margin-right: auto; -} -.thumbnail .caption { - padding: 9px; - color: #555555; -} -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.alert, -.alert h4 { - color: #c09853; -} -.alert h4 { - margin: 0; -} -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 15px; -} -.alert-success { - background-color: #dff0d8; - border-color: #d6e9c6; - color: #468847; -} -.alert-success h4 { - color: #468847; -} -.alert-danger, -.alert-error { - background-color: #f2dede; - border-color: #eed3d7; - color: #b94a48; -} -.alert-danger h4, -.alert-error h4 { - color: #b94a48; -} -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; - color: #3a87ad; -} -.alert-info h4 { - color: #3a87ad; -} -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} -.alert-block p + p { - margin-top: 5px; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - overflow: hidden; - height: 15px; - margin-bottom: 15px; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.progress .bar { - width: 0%; - height: 100%; - color: #ffffff; - float: left; - font-size: 12px; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(to bottom, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} -.progress .bar + .bar { - -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); - -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); - box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); -} -.progress-striped .bar { - background-color: #149bdf; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-danger .bar, -.progress .bar-danger { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); -} -.progress-danger.progress-striped .bar, -.progress-striped .bar-danger { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-success .bar, -.progress .bar-success { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(to bottom, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); -} -.progress-success.progress-striped .bar, -.progress-striped .bar-success { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-info .bar, -.progress .bar-info { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(to bottom, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); -} -.progress-info.progress-striped .bar, -.progress-striped .bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-warning .bar, -.progress .bar-warning { - background-color: #e98031; - background-image: -moz-linear-gradient(top, #f29048, #dd6710); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f29048), to(#dd6710)); - background-image: -webkit-linear-gradient(top, #f29048, #dd6710); - background-image: -o-linear-gradient(top, #f29048, #dd6710); - background-image: linear-gradient(to bottom, #f29048, #dd6710); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff29048', endColorstr='#ffdd6710', GradientType=0); -} -.progress-warning.progress-striped .bar, -.progress-striped .bar-warning { - background-color: #f29048; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.hero-unit { - padding: 60px; - margin-bottom: 30px; - font-size: 18px; - font-weight: 200; - line-height: 22.5px; - color: inherit; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - color: inherit; - letter-spacing: -1px; -} -.hero-unit li { - line-height: 22.5px; -} -.media, -.media-body { - overflow: hidden; - *overflow: visible; - zoom: 1; -} -.media, -.media .media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media-object { - display: block; -} -.media-heading { - margin: 0 0 5px; -} -.media > .pull-left { - margin-right: 10px; -} -.media > .pull-right { - margin-left: 10px; -} -.media-list { - margin-left: 0; - list-style: none; -} -.tooltip { - position: absolute; - z-index: 1030; - display: block; - visibility: visible; - font-size: 11px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.tooltip.top { - margin-top: -3px; - padding: 5px 0; -} -.tooltip.right { - margin-left: 3px; - padding: 0 5px; -} -.tooltip.bottom { - margin-top: 3px; - padding: 5px 0; -} -.tooltip.left { - margin-left: -3px; - padding: 0 5px; -} -.tooltip-inner { - max-width: 200px; - padding: 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - background-color: #ffffff; - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - white-space: normal; -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - margin: 0; - padding: 8px 14px; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} -.popover-title:empty { - display: none; -} -.popover-content { - padding: 9px 14px; -} -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover .arrow { - border-width: 11px; -} -.popover .arrow:after { - border-width: 10px; - content: ""; -} -.popover.top .arrow { - left: 50%; - margin-left: -11px; - border-bottom-width: 0; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, 0.25); - bottom: -11px; -} -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-bottom-width: 0; - border-top-color: #ffffff; -} -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-left-width: 0; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, 0.25); -} -.popover.right .arrow:after { - left: 1px; - bottom: -10px; - border-left-width: 0; - border-right-color: #ffffff; -} -.popover.bottom .arrow { - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - top: -11px; -} -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-top-width: 0; - border-bottom-color: #ffffff; -} -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, 0.25); -} -.popover.left .arrow:after { - right: 1px; - border-right-width: 0; - border-left-color: #ffffff; - bottom: -10px; -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} -.modal-backdrop.fade { - opacity: 0; -} -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} -.modal { - position: fixed; - top: 10%; - left: 50%; - z-index: 1050; - width: 560px; - margin-left: -280px; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - /* IE6-7 */ - - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; - outline: none; -} -.modal.fade { - -webkit-transition: opacity .3s linear, top .3s ease-out; - -moz-transition: opacity .3s linear, top .3s ease-out; - -o-transition: opacity .3s linear, top .3s ease-out; - transition: opacity .3s linear, top .3s ease-out; - top: -25%; -} -.modal.fade.in { - top: 10%; -} -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} -.modal-header .close { - margin-top: 2px; -} -.modal-header h3 { - margin: 0; - line-height: 30px; -} -.modal-body { - position: relative; - overflow-y: auto; - max-height: 400px; - padding: 15px; -} -.modal-form { - margin-bottom: 0; -} -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; - *zoom: 1; -} -.modal-footer:before, -.modal-footer:after { - display: table; - content: ""; - line-height: 0; -} -.modal-footer:after { - clear: both; -} -.modal-footer .btn + .btn { - margin-left: 5px; - margin-bottom: 0; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} -.dropup, -.dropdown { - position: relative; -} -.dropdown-toggle { - *margin-bottom: -3px; -} -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 6.5px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 15px; - color: #333333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus, -.dropdown-submenu:hover > a, -.dropdown-submenu:focus > a { - text-decoration: none; - color: #ffffff; - background-color: #690043; - background-image: -moz-linear-gradient(top, #730049, #5a0039); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#730049), to(#5a0039)); - background-image: -webkit-linear-gradient(top, #730049, #5a0039); - background-image: -o-linear-gradient(top, #730049, #5a0039); - background-image: linear-gradient(to bottom, #730049, #5a0039); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff730049', endColorstr='#ff5a0039', GradientType=0); -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - outline: 0; - background-color: #690043; - background-image: -moz-linear-gradient(top, #730049, #5a0039); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#730049), to(#5a0039)); - background-image: -webkit-linear-gradient(top, #730049, #5a0039); - background-image: -o-linear-gradient(top, #730049, #5a0039); - background-image: linear-gradient(to bottom, #730049, #5a0039); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff730049', endColorstr='#ff5a0039', GradientType=0); -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - cursor: default; -} -.open { - *z-index: 1000; -} -.open > .dropdown-menu { - display: block; -} -.dropdown-backdrop { - position: fixed; - left: 0; - right: 0; - bottom: 0; - top: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} -.dropdown-submenu { - position: relative; -} -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px 6px; - border-radius: 0 6px 6px 6px; -} -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} -.dropup .dropdown-submenu > .dropdown-menu { - top: auto; - bottom: 0; - margin-top: 0; - margin-bottom: -2px; - -webkit-border-radius: 5px 5px 5px 0; - -moz-border-radius: 5px 5px 5px 0; - border-radius: 5px 5px 5px 0; -} -.dropdown-submenu > a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} -.dropdown-submenu:hover > a:after { - border-left-color: #ffffff; -} -.dropdown-submenu.pull-left { - float: none; -} -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} -.dropdown .dropdown-menu .nav-header { - padding-left: 20px; - padding-right: 20px; -} -.typeahead { - z-index: 1051; - margin-top: 2px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.accordion { - margin-bottom: 15px; -} -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.accordion-heading { - border-bottom: 0; -} -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} -.accordion-toggle { - cursor: pointer; -} -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} -.carousel { - position: relative; - margin-bottom: 15px; - line-height: 1; -} -.carousel-inner { - overflow: hidden; - width: 100%; - position: relative; -} -.carousel-inner > .item { - display: none; - position: relative; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - line-height: 1; -} -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} -.carousel-control.right { - left: auto; - right: 15px; -} -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} -.carousel-indicators { - position: absolute; - top: 15px; - right: 15px; - z-index: 5; - margin: 0; - list-style: none; -} -.carousel-indicators li { - display: block; - float: left; - width: 10px; - height: 10px; - margin-left: 5px; - text-indent: -999px; - background-color: #ccc; - background-color: rgba(255, 255, 255, 0.25); - border-radius: 5px; -} -.carousel-indicators .active { - background-color: #fff; -} -.carousel-caption { - position: absolute; - left: 0; - right: 0; - bottom: 0; - padding: 15px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} -.carousel-caption h4, -.carousel-caption p { - color: #ffffff; - line-height: 15px; -} -.carousel-caption h4 { - margin: 0 0 5px; -} -.carousel-caption p { - margin-bottom: 0; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} -.well-large { - padding: 24px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.well-small { - padding: 9px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 15px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -.pull-right { - float: right; -} -.pull-left { - float: left; -} -.hide { - display: none; -} -.show { - display: block; -} -.invisible { - visibility: hidden; -} -.affix { - position: fixed; -} -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} -.collapse.in { - height: auto; -} -@-ms-viewport { - width: device-width; -} -.hidden { - display: none; - visibility: hidden; -} -.visible-phone { - display: none !important; -} -.visible-tablet { - display: none !important; -} -.hidden-desktop { - display: none !important; -} -.visible-desktop { - display: inherit !important; -} -/* =================== DIVEERSE DEVICE ========================= -@media (min-width: 768px) and (max-width: 979px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important ; - } - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } -} -@media (max-width: 767px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important; - } - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: inherit !important; - } - .hidden-print { - display: none !important; - } -} -@media (max-width: 767px) { - body { - padding-left: 20px; - padding-right: 20px; - } - .navbar-fixed-top, - .navbar-fixed-bottom, - .navbar-static-top { - margin-left: -20px; - margin-right: -20px; - } - .container-fluid { - padding: 0; - } - .dl-horizontal dt { - float: none; - clear: none; - width: auto; - text-align: left; - } - .dl-horizontal dd { - margin-left: 0; - } - .container { - width: auto; - } - .row-fluid { - width: 100%; - } - .row, - .thumbnails { - margin-left: 0; - } - .thumbnails > li { - float: none; - margin-left: 0; - } - [class*="span"], - .uneditable-input[class*="span"], - .row-fluid [class*="span"] { - float: none; - display: block; - width: 100%; - margin-left: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .span12, - .row-fluid .span12 { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="offset"]:first-child { - margin-left: 0; - } - .input-large, - .input-xlarge, - .input-xxlarge, - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - min-height: 25px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - .input-prepend input, - .input-append input, - .input-prepend input[class*="span"], - .input-append input[class*="span"] { - display: inline-block; - width: auto; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 0; - } - .modal { - position: fixed; - top: 20px; - left: 20px; - right: 20px; - width: auto; - margin: 0; - } - .modal.fade { - top: -100px; - } - .modal.fade.in { - top: 20px; - } -} -@media (max-width: 480px) { - .nav-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 15px; - } - input[type="checkbox"], - input[type="radio"] { - border: 1px solid #ccc; - } - .form-horizontal .control-label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-left: 10px; - padding-right: 10px; - } - .media .pull-left, - .media .pull-right { - float: none; - display: block; - margin-bottom: 10px; - } - .media-object { - margin-right: 0; - margin-left: 0; - } - .modal { - top: 10px; - left: 10px; - right: 10px; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -8px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - line-height: 0; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 8px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 760px; - } - .span12 { - width: 760px; - } - .span11 { - width: 696px; - } - .span10 { - width: 632px; - } - .span9 { - width: 568px; - } - .span8 { - width: 504px; - } - .span7 { - width: 440px; - } - .span6 { - width: 376px; - } - .span5 { - width: 312px; - } - .span4 { - width: 248px; - } - .span3 { - width: 184px; - } - .span2 { - width: 120px; - } - .span1 { - width: 56px; - } - .offset12 { - margin-left: 776px; - } - .offset11 { - margin-left: 712px; - } - .offset10 { - margin-left: 648px; - } - .offset9 { - margin-left: 584px; - } - .offset8 { - margin-left: 520px; - } - .offset7 { - margin-left: 456px; - } - .offset6 { - margin-left: 392px; - } - .offset5 { - margin-left: 328px; - } - .offset4 { - margin-left: 264px; - } - .offset3 { - margin-left: 200px; - } - .offset2 { - margin-left: 136px; - } - .offset1 { - margin-left: 72px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - line-height: 0; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - width: 100%; - min-height: 25px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: left; - margin-left: 1.0526315789473684%; - *margin-left: 1.000110570544007%; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 1.0526315789473684%; - } - .row-fluid .span12 { - width: 99.99999999999999%; - *width: 99.94747899159663%; - } - .row-fluid .span11 { - width: 91.57894736842104%; - *width: 91.52642636001768%; - } - .row-fluid .span10 { - width: 83.1578947368421%; - *width: 83.10537372843874%; - } - .row-fluid .span9 { - width: 74.73684210526315%; - *width: 74.68432109685979%; - } - .row-fluid .span8 { - width: 66.3157894736842%; - *width: 66.26326846528085%; - } - .row-fluid .span7 { - width: 57.89473684210526%; - *width: 57.8422158337019%; - } - .row-fluid .span6 { - width: 49.47368421052631%; - *width: 49.42116320212295%; - } - .row-fluid .span5 { - width: 41.05263157894736%; - *width: 41.000110570544%; - } - .row-fluid .span4 { - width: 32.63157894736842%; - *width: 32.57905793896506%; - } - .row-fluid .span3 { - width: 24.21052631578947%; - *width: 24.15800530738611%; - } - .row-fluid .span2 { - width: 15.789473684210524%; - *width: 15.736952675807162%; - } - .row-fluid .span1 { - width: 7.368421052631578%; - *width: 7.315900044228217%; - } - .row-fluid .offset12 { - margin-left: 102.10526315789473%; - *margin-left: 102.000221141088%; - } - .row-fluid .offset12:first-child { - margin-left: 101.05263157894736%; - *margin-left: 100.94758956214064%; - } - .row-fluid .offset11 { - margin-left: 93.68421052631578%; - *margin-left: 93.57916850950906%; - } - .row-fluid .offset11:first-child { - margin-left: 92.63157894736841%; - *margin-left: 92.52653693056169%; - } - .row-fluid .offset10 { - margin-left: 85.26315789473684%; - *margin-left: 85.15811587793011%; - } - .row-fluid .offset10:first-child { - margin-left: 84.21052631578947%; - *margin-left: 84.10548429898274%; - } - .row-fluid .offset9 { - margin-left: 76.84210526315789%; - *margin-left: 76.73706324635117%; - } - .row-fluid .offset9:first-child { - margin-left: 75.78947368421052%; - *margin-left: 75.6844316674038%; - } - .row-fluid .offset8 { - margin-left: 68.42105263157895%; - *margin-left: 68.31601061477222%; - } - .row-fluid .offset8:first-child { - margin-left: 67.36842105263158%; - *margin-left: 67.26337903582485%; - } - .row-fluid .offset7 { - margin-left: 60%; - *margin-left: 59.89495798319328%; - } - .row-fluid .offset7:first-child { - margin-left: 58.94736842105263%; - *margin-left: 58.84232640424591%; - } - .row-fluid .offset6 { - margin-left: 51.57894736842105%; - *margin-left: 51.47390535161433%; - } - .row-fluid .offset6:first-child { - margin-left: 50.52631578947368%; - *margin-left: 50.42127377266696%; - } - .row-fluid .offset5 { - margin-left: 43.1578947368421%; - *margin-left: 43.05285272003538%; - } - .row-fluid .offset5:first-child { - margin-left: 42.10526315789473%; - *margin-left: 42.00022114108801%; - } - .row-fluid .offset4 { - margin-left: 34.73684210526316%; - *margin-left: 34.63180008845644%; - } - .row-fluid .offset4:first-child { - margin-left: 33.68421052631579%; - *margin-left: 33.57916850950907%; - } - .row-fluid .offset3 { - margin-left: 26.315789473684205%; - *margin-left: 26.210747456877485%; - } - .row-fluid .offset3:first-child { - margin-left: 25.26315789473684%; - *margin-left: 25.15811587793012%; - } - .row-fluid .offset2 { - margin-left: 17.89473684210526%; - *margin-left: 17.78969482529854%; - } - .row-fluid .offset2:first-child { - margin-left: 16.842105263157894%; - *margin-left: 16.73706324635117%; - } - .row-fluid .offset1 { - margin-left: 9.473684210526315%; - *margin-left: 9.368642193719591%; - } - .row-fluid .offset1:first-child { - margin-left: 8.421052631578947%; - *margin-left: 8.316010614772223%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 8px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 746px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 682px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 618px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 554px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 490px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 426px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 362px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 298px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 234px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 170px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 106px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 42px; - } -} -@media (min-width: 1200px) { - .row { - margin-left: -8px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - line-height: 0; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 8px; - } - .container, - .navbar-static-top .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1192px; - } - .span12 { - width: 1192px; - } - .span11 { - width: 1092px; - } - .span10 { - width: 992px; - } - .span9 { - width: 892px; - } - .span8 { - width: 792px; - } - .span7 { - width: 692px; - } - .span6 { - width: 592px; - } - .span5 { - width: 492px; - } - .span4 { - width: 392px; - } - .span3 { - width: 292px; - } - .span2 { - width: 192px; - } - .span1 { - width: 92px; - } - .offset12 { - margin-left: 1208px; - } - .offset11 { - margin-left: 1108px; - } - .offset10 { - margin-left: 1008px; - } - .offset9 { - margin-left: 908px; - } - .offset8 { - margin-left: 808px; - } - .offset7 { - margin-left: 708px; - } - .offset6 { - margin-left: 608px; - } - .offset5 { - margin-left: 508px; - } - .offset4 { - margin-left: 408px; - } - .offset3 { - margin-left: 308px; - } - .offset2 { - margin-left: 208px; - } - .offset1 { - margin-left: 108px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - line-height: 0; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - width: 100%; - min-height: 25px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: left; - margin-left: 0.6711409395973155%; - *margin-left: 0.6186199311939541%; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .controls-row [class*="span"] + [class*="span"] { - margin-left: 0.6711409395973155%; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94747899159664%; - } - .row-fluid .span11 { - width: 91.61073825503355%; - *width: 91.55821724663019%; - } - .row-fluid .span10 { - width: 83.22147651006712%; - *width: 83.16895550166376%; - } - .row-fluid .span9 { - width: 74.83221476510067%; - *width: 74.77969375669731%; - } - .row-fluid .span8 { - width: 66.44295302013423%; - *width: 66.39043201173087%; - } - .row-fluid .span7 { - width: 58.05369127516779%; - *width: 58.00117026676443%; - } - .row-fluid .span6 { - width: 49.66442953020134%; - *width: 49.61190852179798%; - } - .row-fluid .span5 { - width: 41.2751677852349%; - *width: 41.22264677683154%; - } - .row-fluid .span4 { - width: 32.88590604026846%; - *width: 32.8333850318651%; - } - .row-fluid .span3 { - width: 24.496644295302012%; - *width: 24.44412328689865%; - } - .row-fluid .span2 { - width: 16.107382550335572%; - *width: 16.054861541932212%; - } - .row-fluid .span1 { - width: 7.718120805369128%; - *width: 7.6655997969657665%; - } - .row-fluid .offset12 { - margin-left: 101.34228187919463%; - *margin-left: 101.23723986238791%; - } - .row-fluid .offset12:first-child { - margin-left: 100.67114093959732%; - *margin-left: 100.5660989227906%; - } - .row-fluid .offset11 { - margin-left: 92.95302013422818%; - *margin-left: 92.84797811742146%; - } - .row-fluid .offset11:first-child { - margin-left: 92.28187919463087%; - *margin-left: 92.17683717782415%; - } - .row-fluid .offset10 { - margin-left: 84.56375838926175%; - *margin-left: 84.45871637245503%; - } - .row-fluid .offset10:first-child { - margin-left: 83.89261744966444%; - *margin-left: 83.78757543285772%; - } - .row-fluid .offset9 { - margin-left: 76.1744966442953%; - *margin-left: 76.06945462748858%; - } - .row-fluid .offset9:first-child { - margin-left: 75.503355704698%; - *margin-left: 75.39831368789127%; - } - .row-fluid .offset8 { - margin-left: 67.78523489932886%; - *margin-left: 67.68019288252214%; - } - .row-fluid .offset8:first-child { - margin-left: 67.11409395973155%; - *margin-left: 67.00905194292483%; - } - .row-fluid .offset7 { - margin-left: 59.39597315436242%; - *margin-left: 59.2909311375557%; - } - .row-fluid .offset7:first-child { - margin-left: 58.72483221476511%; - *margin-left: 58.61979019795839%; - } - .row-fluid .offset6 { - margin-left: 51.00671140939597%; - *margin-left: 50.90166939258925%; - } - .row-fluid .offset6:first-child { - margin-left: 50.335570469798654%; - *margin-left: 50.23052845299193%; - } - .row-fluid .offset5 { - margin-left: 42.61744966442953%; - *margin-left: 42.51240764762281%; - } - .row-fluid .offset5:first-child { - margin-left: 41.946308724832214%; - *margin-left: 41.84126670802549%; - } - .row-fluid .offset4 { - margin-left: 34.22818791946309%; - *margin-left: 34.12314590265637%; - } - .row-fluid .offset4:first-child { - margin-left: 33.557046979865774%; - *margin-left: 33.45200496305905%; - } - .row-fluid .offset3 { - margin-left: 25.838926174496642%; - *margin-left: 25.73388415768992%; - } - .row-fluid .offset3:first-child { - margin-left: 25.167785234899327%; - *margin-left: 25.062743218092606%; - } - .row-fluid .offset2 { - margin-left: 17.449664429530202%; - *margin-left: 17.34462241272348%; - } - .row-fluid .offset2:first-child { - margin-left: 16.778523489932887%; - *margin-left: 16.673481473126166%; - } - .row-fluid .offset1 { - margin-left: 9.060402684563758%; - *margin-left: 8.955360667757036%; - } - .row-fluid .offset1:first-child { - margin-left: 8.389261744966444%; - *margin-left: 8.28421972815972%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - .controls-row [class*="span"] + [class*="span"] { - margin-left: 8px; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 1178px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 1078px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 978px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 878px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 778px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 678px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 578px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 478px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 378px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 278px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 178px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 78px; - } - .thumbnails { - margin-left: -8px; - } - .thumbnails > li { - margin-left: 8px; - } - .row-fluid .thumbnails { - margin-left: 0; - } -} -@media (max-width: 979px) { - body { - padding-top: 0; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - position: static; - } - .navbar-fixed-top { - margin-bottom: 15px; - } - .navbar-fixed-bottom { - margin-top: 15px; - } - .navbar-fixed-top .navbar-inner, - .navbar-fixed-bottom .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-left: 10px; - padding-right: 10px; - margin: 0 0 0 -5px; - } - .nav-collapse { - clear: both; - } - .nav-collapse .nav { - float: none; - margin: 0 0 7.5px; - } - .nav-collapse .nav > li { - float: none; - } - .nav-collapse .nav > li > a { - margin-bottom: 2px; - } - .nav-collapse .nav > .divider-vertical { - display: none; - } - .nav-collapse .nav .nav-header { - color: #777777; - text-shadow: none; - } - .nav-collapse .nav > li > a, - .nav-collapse .dropdown-menu a { - padding: 9px 15px; - font-weight: bold; - color: #777777; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .nav-collapse .btn { - padding: 4px 10px 4px; - font-weight: normal; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - } - .nav-collapse .dropdown-menu li + li a { - margin-bottom: 2px; - } - .nav-collapse .nav > li > a:hover, - .nav-collapse .nav > li > a:focus, - .nav-collapse .dropdown-menu a:hover, - .nav-collapse .dropdown-menu a:focus { - background-color: #f2f2f2; - } - .navbar-inverse .nav-collapse .nav > li > a, - .navbar-inverse .nav-collapse .dropdown-menu a { - color: #999999; - } - .navbar-inverse .nav-collapse .nav > li > a:hover, - .navbar-inverse .nav-collapse .nav > li > a:focus, - .navbar-inverse .nav-collapse .dropdown-menu a:hover, - .navbar-inverse .nav-collapse .dropdown-menu a:focus { - background-color: #111111; - } - .nav-collapse.in .btn-group { - margin-top: 5px; - padding: 0; - } - .nav-collapse .dropdown-menu { - position: static; - top: auto; - left: auto; - float: none; - display: none; - max-width: none; - margin: 0 15px; - padding: 0; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .nav-collapse .open > .dropdown-menu { - display: block; - } - .nav-collapse .dropdown-menu:before, - .nav-collapse .dropdown-menu:after { - display: none; - } - .nav-collapse .dropdown-menu .divider { - display: none; - } - .nav-collapse .nav > li > .dropdown-menu:before, - .nav-collapse .nav > li > .dropdown-menu:after { - display: none; - } - .nav-collapse .navbar-form, - .nav-collapse .navbar-search { - float: none; - padding: 7.5px 15px; - margin: 7.5px 0; - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); - -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); - box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); - } - .navbar-inverse .nav-collapse .navbar-form, - .navbar-inverse .nav-collapse .navbar-search { - border-top-color: #111111; - border-bottom-color: #111111; - } - .navbar .nav-collapse .nav.pull-right { - float: none; - margin-left: 0; - } - .nav-collapse, - .nav-collapse.collapse { - overflow: hidden; - height: 0; - } - .navbar .btn-navbar { - display: block; - } - .navbar-static .navbar-inner { - padding-left: 10px; - padding-right: 10px; - } -} -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -} - -*/ \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui-customize.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui-customize.css deleted file mode 100644 index 6f3a24d1..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui-customize.css +++ /dev/null @@ -1,1201 +0,0 @@ - -/* =========== A (linkage) ============ */ - -a { - color: #730049; - text-decoration: none; -} - -a:hover { - color: #730049; - text-decoration: underline; -} - -/* =========== Accordion ============ */ - -.accordion { - margin-top: 10px; - margin-bottom: 10px; -} - -.accordion-group { - border: none; - margin-bottom: 0px; -} - -.accordion-group .according-body { - border-bottom: 1px solid #EEE; -} - -/* =========== Bottom Action ============ */ -.bottom-action { - margin-top: 10px; - border-top: 1px solid #E0E1E3; -} - -.bottom-action p { - margin-top: 10px; -} -/* =========== Body ============ */ - -body { - color: #2E3337; - font-family: Verdana,Microsoft YaHei,SimSun,Arial,sans-serif; - font-size: 12px; - line-height: inherit; -} - - -/* =========== Breadcrumb ============ */ - -.breadcrumb { - background-color: #EEEEEE; - border-radius: 0 0 0 0; - list-style: none outside none; - margin: 0px; - padding: 5px 10px; -} - -.breadcrumb > li { - text-shadow: none; -} - -.breadcrumb > .active { - color: #2E3337; -} - -.breadcrumb > li > .divider { - color: #808A90; - padding: 0 ; -} - -/* =========== Button ============ */ - -.btn { - background-color: #730049; - background-image: none; - border: medium none; - border-radius: 0px; - box-shadow: none; - color: #FFF; - font-size: 12px; - line-height: 15px; - margin: 0px; - transition: all 0.25s ease 0s; - padding: 4.5px 6px; - padding: 5px 6px \9; /* IE-8/9 */ - *padding: 5px 6px; /* IE-7 */ -} - -button.btn { - padding: 5px 6px; -} - -.btn:hover { - background-color: #730049; - opacity:0.8; -} -.btn.active { - color: #FFF; -} - -/* Button Disabled */ - -.btn.disabled, .btn[disabled] { - background-color: #E0E1E3; - opacity: 0.5 !important; -} - -.btn.disabled:hover, .btn[disabled]:hover { - opacity: 0.5 !important; -} - - -/* Button Group */ -.btn-group .btn.dropdown-toggle:hover { - opacity: 0.8; -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #730049; - color: #FFF; - opacity: 0.8; -} - -.btn-group + .btn-group { - margin-left: 0px; -} - -.btn-group > .btn { - font-size: 12px; - height: inherit; - line-height: inherit; - background-color: #730049; -} - -.btn-group > .btn:first-of-type { - border-bottom-left-radius: 0px; - border-top-left-radius: 0px; -} - -.btn-group > .btn:last-of-type { - border-bottom-right-radius: 0px; - border-top-right-radius: 0px; -} - -/* Button Query & Dropdown */ - -.btn.btn-query { - background-color: #828A90; -} -.btn.btn-dropdown { - background-color: #828A90; -} - - -/* Button: Standard, Reverse, Action, Highlight */ - -.btn.btn-reverse-icon { - background-color: #2E3337; -} -.btn.btn-action-icon { - background-color: #828A90; -} -.btn.btn-highlight-icon { - background-color: #008080; -} - -.btn-standard, .btn-reverse, .btn-action, .btn-highlight { - padding: 0px; - background-color: transparent !important; -} - -.btn-standard:hover, .btn-revers:hover, .btn-action:hover, .btn-highlight:hover { - background-color: transparent !important; -} - -.btn span:first-child { - float:left; - width: 6px; - height: 25px; - cursor: pointer; -} - -.btn span.bg-right { - float:left; - padding: 0 10px 0 5px; - vertical-align: middle; - height: 25px; - line-height: 25px; - color:#FFF; - cursor: pointer; -} - -/* Left Side */ -.btn.btn-standard span:first-child { - background-image: url("../img/connsec-btn/standard-left.png"); -} -.btn.btn-reverse span:first-child { - background-image: url("../img/connsec-btn/reverse-left.png"); -} -.btn.btn-action span:first-child { - background-image: url("../img/connsec-btn/action-left.png"); -} -.btn.btn-highlight span:first-child { - background-image: url("../img/connsec-btn/highlight-left.png"); -} - -/* Right Side */ -.btn.btn-standard span.bg-right { - background-color: #730049; -} -.btn.btn-reverse span.bg-right { - background-color: #2E3337; -} -.btn.btn-action span.bg-right { - background-color: #828A90; -} -.btn.btn-highlight span.bg-right { - background-color: #008080; -} - -/* =========== Caret ============ */ -.caret { - border-top-color: #FFF; - transform: none; -} - -.btn .caret { - margin-top: 4px; - padding-bottom: 4px; -} - -table .caret { - border-top-color: #730049; - opacity: 0.3; -} - -table .dropdown .caret { - margin-left: 0px; - margin-top: 6px; -} - -table .dropdown:hover .caret { - opacity: 1.0; -} - - -/* =========== Checkbox ============ */ - -.checkbox { - margin-bottom: 0; - padding-left: 10px; -} - -.checkbox .icons { - color: #E0E1E3; - font-size: 15px; - line-height: 25px; - height: 25px; - width: auto; -} - -.control-group label.checkbox { - float: left; -} - -.table-list .checkbox .icons { - line-height: 15px; - height: 15px; -} -tr:hover .checkbox .icons { - color: #FFF; -} - -tr:hover .checkbox .icons:hover { - color: #730049; - opacity: 0.3; -} - -.checkbox.checked .icons, tr:hover .checkbox.checked .icons { - color: #730049; - opacity: 1.0; -} - -/* ======== Control-group / control-label / controls ========== */ - -.control-group { - display: inline-block; -} - -.control-small-label, .control-middle-label, .control-large-label { - float: left; - font-size: inherit; - font-weight: bold; - text-align: right; - color: #828A90; - height: 15px; - line-height: 15px; - margin-right: 5px; - padding-bottom: 5px; - padding-top: 5px; -} -.control-small-label { - width: 80px; -} -.control-middle-label { - width: 110px; -} -.control-large-label { - width: 200px; -} - -.form-horizontal .control-group { - margin-bottom: 5px; -} - -.form-horizontal .control-middle-label { - width: 100px; -} - -.form-horizontal .control-middle-label span.required { - color: #008080; -} -.form-horizontal .controls { - margin-left: 105px; -} - -.form-horizontal .controls span { - display: inline-block; - width: 5px; - color: #E0E1E3; - text-align: center; - font-weight: bold; -} - -.form-horizontal .span6 .control-middle-label, .form-horizontal.span6 .control-middle-label { - width: 170px; -} -.form-horizontal .span6 .controls, .form-horizontal.span6 .controls { - margin-left: 175px; -} - -.modal .form-horizontal .control-middle-label { - width: 170px; -} -.modal .form-horizontal .controls { - margin-left: 175px; -} - -/* =========== Dropdown-menu ============ */ -.dropdown-menu { - background-color: rgba(0,0,0,0.8); - color: #FFF; - border-radius: 0 0 2px 2px; - min-width: 130px; - width: auto; -} - -.dropdown-menu li > a { - color: #E0E1E3; - padding: 5px 10px; - font-size: 11px; -} - -.dropdown-menu li:first-child > a { - border-radius: 0; - padding: 5px 10px; -} - -.dropdown-menu li:last-child > a { - border-radius: 0 0 2px 2px; - padding: 5px 10px; -} - -.dropdown-menu li > a:hover { - background-color: #E0E1E3; - color: #730049; -} - -.dropdown-menu li.active > a, .dropdown-menu li.selected > a, .dropdown-menu li.active > a.highlighted, .dropdown-menu li.selected > a.highlighted { - background-color: #730049; - color: #FFFFFF; -} - -.dropdown-menu li.active > a:hover, .dropdown-menu li.selected > a:hover, .dropdown-menu li.active > a.highlighted:hover, .dropdown-menu li.selected > a.highlighted:hover { - background-color: #E0E1E3; - color: #730049; -} - -.nav-tabs .dropdown-menu { - border-radius: 0 0 2px 2px; -} - -.nav-tabs .active .dropdown-toggle .caret { - border-top-color: #828A90; - opacity: 1.0; -} - -.nav-tabs .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #CCC; -} - -.nav-tabs .dropdown-toggle:hover .caret { - border-top-color: #FFF; -} - -.nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret, .nav li.dropdown.open a:focus .caret { - border-top-color: #828A90; -} - -.nav-tabs .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover, .nav > li.dropdown.open.active > a:focus { - background-color: #FFF; - border-color: #FFF; - color: #828A90; -} - -.open > .dropdown-menu { - margin-top: 0px; -} - -.table-list td .dropdown ul.dropdown-menu { - margin-top: 8px; - margin-right: -2px; -} - -/* ======== Form ========== */ - -form { - margin: 0px; -} - - -/* ======== Icon ========== */ - -[class^="icon-"], [class*=" icon-"] { - margin-top: 0; -} - -.btn-group .btn [class^="icon-"], .btn-group .btn [class*=" icon-"] { - margin-top: 1px; -} - -.btn-standard.btn [class^="icon-"], .btn-standard.btn [class*=" icon-"] { - margin-top: 1px; -} - -.input-append .btn [class^="icon-"], .input-append .btn [class*=" icon-"] { - margin-top: -1px; -} -/* ======== Input & Textarea ========== */ - -input, input[type], textarea { - display: inline-block; - background-color: #FFF; - border: none; - border-radius: 2px/*4px*/; - box-shadow: none; - color: inherit; - font-family: inherit; - font-size: 14px; - text-indent: 5px; - padding: 5px 0; - height: 25px; - line-height: 25px; - margin-bottom: 15px; -} - -input[type]:focus, textarea[type]:focus { - border-color: rgba(115,0,73,0.7); -} - -input[type="checkbox"]{ - display: none; -} - -/* input placeholder */ -input::-webkit-input-placeholder{ - color:red; - font-size: 0.85em; -} -input::-moz-placeholder{ - color:#828A90; - font-size: 0.85em; -} - -/* input readonly & disable */ -input[readonly], textarea[readonly] { - background-color: #EEE; - border: 2px solid #E0E1E3; - color: #828A90; - opacity: 0.8; - cursor: not-allowed; -} -input[readonly]:focus, textarea[readonly]:focus { - border: 2px solid #E0E1E3; -} -input[disabled], textarea[disabled] { - background-color: #EEE; - border: 2px solid #E0E1E3; - color: #828A90; - opacity: 0.8; - cursor: not-allowed; -} -input[disabled]:focus, textarea[disabled]:focus { - border: 2px solid #E0E1E3; -} - -/* input series */ -.input-mini { - width: 66.5px; -} -.input-small { - width: 80px; -} -.input-medium { - width: 150px; -} -.input-large { - width: 270px; -} - -/* ======== input-append & input-prepend ========== */ - -.input-append, .input-prepend { - margin-bottom: 0px; -} - -/* ======== Label ========== */ -label { - margin-bottom: 0; - display: inline-block; -} - -/* =========== Modal ============ */ -.modal.fade.in { - top: 18%; -} -.modal { - border-radius: 0 0 0 0; - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1); - width: auto; - min-width:560px; - max-width:960px; -} - -.modal-header { - border-bottom: none/*1px solid #E0E1E3*/; - padding: 0; - background-color: #828A90; - color: #FFF; -} - -.modal-header .close { - background-color: #730049; - color: #FFFFFF; - float: right; - font-size: 30px; - font-weight: 100; - height: 20px; - width: 20px; - margin-top: 0; - margin-right: 20px; - opacity: 1.0; - text-shadow: none; -} - -.modal-header h4 { - font-size: 12px; - font-weight: bold; - line-height: 20px; - margin: 0 0 0 20px; -} - -.modal-footer { - background-color: #FFF; - border-radius: 0 0 0 0; - border-top: 1px solid #E0E1E3; - padding: 5px 20px; -} - -.modal-body { - min-height: 200px; - overflow-y: auto; - padding: 10px 20px 5px; - position: relative; -} - -.modal-body .nav-tabs { - border-bottom: 1px solid #E0E1E3; -} - - -/* =========== Nav / Nav-tabs ============ */ -.nav-tabs { - margin-bottom: 0px; - border-bottom: 2px solid #E0E1E3; -} - -.nav-tabs > li { - margin-bottom: 0px; -} - -.nav-tabs > li > a { - color: #CCC; - background-color: #FFF; - padding: 5px 8px; - border-radius: 2px 2px 0 0; - font-weight: bold; -} - -.nav-tabs > li > a:hover { - color: #FFF; - background-color: #828A90; - border: 1px solid #828A90; - border-radius: 2px 2px 0 0; -} - -.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover { - border: 1px solid #FFF; - color: #828A90; - font-weight: bold; - outline: none; -} - -.nav-tabs .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover{ - background-color: #FFF; - border: 1px solid #FFF; - color: #828A90; -} - -/* =========== P ============ */ -p { - margin: 0px; -} - -/* =========== Pagination ============ */ - -/* pagination ul */ -.pagination { - margin: 0px; - background-color: #EEE; -} - -.pagination ul { - background-color: transparent; - border: none; -} - -.pagination ul li { - margin-right: -5px; -} - -.pagination ul li > a { - background-color: #EEE; - border: none; - color: rgba(115,0,73,0.5); - line-height: 25px; - height: 25px; - margin: 0; - padding: 0 5px; - border-radius: 0px !important; -} - -.pagination ul li > a:hover, .pagination ul li > a:focus{ - color: #FFF; - background-color: #730049; -} - -.pagination ul li.active > a { - background-color: #EEE; - color: #828A90; - border: none; - margin: 0px; - font-weight: bold; -} - -.pagination ul li.active > a:hover, .pagination ul li.active > a:focus { - background-color: #EEE; - color: #828A90; -} - -/* pagination label */ -.pagination label { - height: 25px; - line-height: 25px; - border-radius: 0px; - background-color: transparent; - color: #828A90; - font-size: 12px; - font-weight: normal; - text-shadow: none; - padding: 0 0 0 10px; -} - -.pagination label.label-summary { - padding-right: 10px; -} - -.pagination label.label-summary span { - font-weight: bold; -} - -/* pagination input */ -.pagination input { - height: 15px; - line-height: 15px; - border-radius: 0px; - width:50px; -} - -.pagination .input-append { - margin-top: -3px; -} - -.pagination .input-append .add-on { - border: none; - border-top: 2px solid #E0E1E3; - border-bottom: 2px solid #E0E1E3; - color: #828A90; - background-color: transparent; - padding: 3px 5px; - text-shadow: none; -} - -/* pagination select */ -.pagination select { - width:60px; - height: 25px; - line-height: 25px; - border-radius: 0px; -} - -/* pagination button */ -.pagination .input-append .btn { - text-decoration: none; - border-radius: 0px; -} - -.pagination .input-append .btn:hover { - background-color: #828A90; -} - -/* =========== Popover ============ */ - -.popover { - background-color: transparent; - box-shadow: none; - padding: 0px; - border: medium none; - margin-top: 1px; - max-width: 500px; -} - -.popover-inner { - background-color: #FFF; - border-radius: 4px 4px 4px 4px; - box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); - overflow: hidden; - width: 415px; -} - -.popover-title { - background-color: #FFF; - color: #828A90; - font-size: 12px; - font-weight: bold; - padding: 3px 10px; - border: none; - border-bottom: 2px solid #730049; -} -.popover-content { - padding: 0 10px; - -} -.dl-horizontal-tips dt { - clear: left; - float: left; - font-weight: normal; - font-style: italic; - text-align: right; - width: 110px; - font-size:11px; - color: #828A90; -} -.dl-horizontal-tips dd { - margin-left: 115px; - width: 280px; - font-size:11px; -} -.dl-horizontal-tips hr { - margin: 3px 0; -} - -/* =========== connsec Footer ============ */ - -.connsec-footer { - background-image: url("../img/connsec-footer/footer-bottom.png"); - background-repeat: repeat-x; - bottom: 0; - height: 67px; - left: 0; - margin-bottom: 0; - overflow: hidden; - position: fixed; - width: 100%; - z-index: 3000; -} - - -.connsec-footer .footer-left { - background-image: url("../img/connsec-footer/footer-left.png"); - background-repeat: repeat-x; - float: left; - height: 70px; - margin-left: -640px; - width: 50%; -} - -.connsec-footer .footer-right { - background-image: url("../img/connsec-footer/footer-right.png"); - background-repeat: repeat-x; - border: 0 none; - float: right; - height: 70px; - margin-right: -640px; - padding: 0; - width: 50%; -} - -.connsec-footer .footer-center { - background-image: url("../img/connsec-footer/footer-top.png"); - border: 0 none; - float: left; - height: 70px; - margin: 0; - padding: 0; - position: relative; - width: 1280px; -} - -.connsec-footer .footer-center p { - color: #828A90; - padding: 8px 0; - font-size: 0.9em; -} - -.connsec-footer .footer-center p > a { - color: #E0E1E3; -} - -.connsec-footer .footer-center p.linkage { - border-bottom: 1px solid #828A90; - margin: 5px 0 0; - width: 500px; -} - -.connsec-footer .footer-center p.multi-lang { - float: right; - display: inline-block; -} - -.connsec-footer .footer-center p.copyright { - width: 500px; - border-top: 1px solid #828A90; - display: inline-block; -} - -/* =========== connsec Header ============ */ - -.connsec-header { - height: auto; - left: 0; - /* position: fixed; *//* on scroll*/ - top: 0; - width: 100%; - z-index: 1030; -} - -.connsec-header .dockbar { - background: none repeat scroll 0 0 #E0E1E3; - height: 21px; -} - -.connsec-header .menubar { - background-color: #2E3337; - background-image: none; - /*background-image: -moz-linear-gradient(center top , #222222, #515151); - background-repeat: repeat-x;*/ - border-bottom: 3px solid #0075A3; - border-top: 3px solid #2E3337; - color: #999999; - display: block; - height: 50px; -} - -.connsec-header .menubar .header-logo { - background-repeat: no-repeat; - background-size: cover; - display: block; - height: 100px; - margin-top: -24px; - position: absolute; - width: 100px; - z-index: 2000; -} - -.connsec-header .menubar p.multi-lang { - float: right; - display: inline-block; - padding-right:10px; - margin-top: 10px; -} - -/* =========== Select ============ */ -select { - background-color: #FFF; - border: 2px solid #E0E1E3; - border-radius: 2px /*4px*/; - box-shadow: none; - color: inherit; - font-family: inherit; - font-size:12px; - height: 25px; - line-height: 25px; - padding:2px 2px 2px 5px; -} - -select:focus { - outline: none; - border-color: rgba(115,0,73,0.7); -} - -/* select readonly & disable */ -select[readonly] { - background-color: #EEE; - border: 2px solid #E0E1E3; - color: #828A90; - opacity: 0.8; - cursor: not-allowed; -} -select[disabled] { - background-color: #EEE; - border: 2px solid #E0E1E3; - color: #828A90; - opacity: 0.8; - cursor: not-allowed; -} - -/* input placeholder */ -select::-webkit-input-placeholder{ - color:red; - font-size: 0.85em; -} -select::-moz-placeholder{ - color:#828A90; - font-size: 0.85em; -} - -/* select series */ -select.select-mini { - width: 54px; -} -select.select-small { - width: 84px; -} -select.select-medium { - width: 154px; -} -select.select-large { - width: 274px; -} - -/* =========== Tab ============ */ -.tab-content { - overflow: inherit; -} - -.modal .tab-content { - margin-top: 10px; -} - -/* =========== Table ============ */ -.table { - margin-bottom: 10px; -} - -.table th { - padding: 5px 2px; - text-align: center; - vertical-align: top; -} - -.table td { - padding: 5px 2px; - text-align: left; - vertical-align: top; -} - -.table tr { - border-top: 2px solid #FFF; - border-bottom: 2px solid #FFF; -} - -.table tr:hover { - border-top: 2px solid #730049; - border-bottom: 2px solid #730049; - background-color: #EEE; - color: #2E3337; -} - -.table tbody tr.info > td { - background-color: rgba(115, 0, 73, 0.1); -} - -.table tbody tr.info:hover > td { - background-color: #EEE; -} - -.table-list { - color: #828A90; -} - -.table-list thead tr{ - background-color: #EEE; -} - -.table-list thead tr:hover{ - background-color: #EEE; - color: #2E3337; - border-top: 2px solid #808A90; - border-bottom: 2px solid #808A90; -} - -.table-list .text-center { - text-align: center; -} - -.table-list td:last-child a.dropdown-toggle:hover, .table-list td:last-child a.dropdown-toggle:active, .table-list td:last-child a.dropdown-toggle:focus { - text-decoration: none; - opacity: 1.0; -} - -/* =========== Uni-Search ============ */ - -.uni-search { - float:right; -} - -/* =========== Upload-box (for batch upload display) ============ */ - -.upload-box { - display: inline-block; - background-color: #EEE; - color: #828A90; - border: 2px solid #E0E1E3; - border-radius: 2px; - height: 21px; - width: 270px; - cursor: not-allowed; - float:left; -} - -/* =========== Well ============ */ - -.well { - position:relative; - background-color: #F5F5F5; - border: medium none; - border-right: 2px solid #730049; - border-radius: 0 0 0 0; - box-shadow: none; - margin-bottom: 0px; - padding: 0 0 0 10px; - line-height: 15px; - vertical-align: middle; - min-height: 450px; -} - -.well-white { - background-color: #FFF; - border-right: /*2px solid transparent*/ none; -} - -.well #tree { - overflow:auto; - margin-left: 5px; -} - -.well #tree .rootFolder { - padding: 5px 0 0; -} - -.well #tree .rootFolder .folder { - background-color:transparent; - background-image:url("../js/zTree/css/img/zTreeStandard.png"); - background-repeat:no-repeat; - background-position: -110px -16px; - display:inline-block; - margin:0; - vertical-align:middle; - height:16px; - width:16px; -} - -.well #tree .zTree { - padding-top: 0px; -} - -.well #sideBar { - position: absolute; - top: 0px; - right: 0px; - height: 25px; - line-height: 25px; - width: 14px; - margin: 0px; - background-color: #730049; - color: #FFF; -} - -.well #sideBar i { - margin-top: 0px; -} - -/*------------zhangyang-----------------*/ - -.container-left{ - width: 360px; - height: 250px; - float: right; -} -.content-welcome{ - color: #828A90; - font-size: 18px; - font-weight: bold; -} -.content-connsec{ - font-size: 25px; - font-weight: 700; - padding-left: 53px; -} -.content-DP{ - display: inline; - color: #730049; - font-size: 25px; - font-weight: 700; - padding-right: 15px; -} -.content-bg{ - display:block; - background: url("../img/connsecLoginBG.png") no-repeat; - width: 359px; - height: 242px; -} - -.container-right{ - background-color: rgba(130,138,144, 0.6); - background-color: rgba(130,138,144) \9; - display: inline-block; - border-radius: 3px; - width: 332px; - height: auto; - padding: 30px 20px; - -} - -input, input[type] { - margin-bottom: 0px; - border-radius: 0px 2px 2px 0px; -} - -.input-prepend{ - margin-bottom: 15px; -} - -.input-prepend .add-on{ - background-color: #828A90; - background-color: #E0E1E3 \9; - border: none; - font-size: 14px; - height: 27px; - line-height: 27px; - padding: 6px 10px 2px; - text-align: center; - text-shadow: none; -} - -.btn.btn-large { - border-radius: 3px; - font-size: 17px; - padding: 9px 20px; -} - - - - - - - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui.css deleted file mode 100644 index 75ca9fa5..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/flat-ui.css +++ /dev/null @@ -1,3868 +0,0 @@ -/*@import url("https://fonts.googleapis.com/css?family=Lato:400,700,700italic,900,400italic,300");*/ -@font-face { - font-family: 'Flat-UI-Icons'; - src: url('../fonts/Flat-UI-Icons.eot'); - src: url('../fonts/Flat-UI-Icons.eot?#iefix') format('embedded-opentype'), url('../fonts/Flat-UI-Icons.woff') format('woff'), url('../fonts/Flat-UI-Icons.ttf') format('truetype'), url('../fonts/Flat-UI-Icons.svg#Flat-UI-Icons') format('svg'); - font-weight: normal; - font-style: normal; -} -/* Use the following CSS code if you want to use data attributes for inserting your icons */ -[data-icon]:before { - font-family: 'Flat-UI-Icons'; - content: attr(data-icon); - speak: none; - font-weight: normal; - font-variant: normal; - text-transform: none; - -webkit-font-smoothing: antialiased; -} -/* Use the following CSS code if you want to have a class per icon */ -/* -Instead of a list of all class selectors, -you can use the generic selector below, but it's slower: -[class*="fui-"] { -*/ -.fui-arrow-right, -.fui-arrow-left, -.fui-cmd, -.fui-check-inverted, -.fui-heart, -.fui-location, -.fui-plus, -.fui-check, -.fui-cross, -.fui-list, -.fui-new, -.fui-video, -.fui-photo, -.fui-volume, -.fui-time, -.fui-eye, -.fui-chat, -.fui-search, -.fui-user, -.fui-mail, -.fui-lock, -.fui-gear, -.fui-radio-unchecked, -.fui-radio-checked, -.fui-checkbox-unchecked, -.fui-checkbox-checked, -.fui-calendar-solid, -.fui-pause, -.fui-play, -.fui-check-inverted-2 { - display: inline-block; - font-family: 'Flat-UI-Icons'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - -webkit-font-smoothing: antialiased; -} -.fui-arrow-right:before { - content: "\e02c"; -} -.fui-arrow-left:before { - content: "\e02d"; -} -.fui-cmd:before { - content: "\e02f"; -} -.fui-check-inverted:before { - content: "\e006"; -} -.fui-heart:before { - content: "\e007"; -} -.fui-location:before { - content: "\e008"; -} -.fui-plus:before { - content: "\e009"; -} -.fui-check:before { - content: "\e00a"; -} -.fui-cross:before { - content: "\e00b"; -} -.fui-list:before { - content: "\e00c"; -} -.fui-new:before { - content: "\e00d"; -} -.fui-video:before { - content: "\e00e"; -} -.fui-photo:before { - content: "\e00f"; -} -.fui-volume:before { - content: "\e010"; -} -.fui-time:before { - content: "\e011"; -} -.fui-eye:before { - content: "\e012"; -} -.fui-chat:before { - content: "\e013"; -} -.fui-search:before { - content: "\e01c"; -} -.fui-user:before { - content: "\e01d"; -} -.fui-mail:before { - content: "\e01e"; -} -.fui-lock:before { - content: "\e01f"; -} -.fui-gear:before { - content: "\e024"; -} -.fui-radio-unchecked:before { - content: "\e02b"; -} -.fui-radio-checked:before { - content: "\e032"; -} -.fui-checkbox-unchecked:before { - content: "\e033"; -} -.fui-checkbox-checked:before { - content: "\e034"; -} -.fui-calendar-solid:before { - content: "\e022"; -} -.fui-pause:before { - content: "\e03b"; -} -.fui-play:before { - content: "\e03c"; -} -.fui-check-inverted-2:before { - content: "\e000"; -} -/* 62px */ -/* 52px */ -/* 40px */ -/* 29px */ -/* 28px */ -/* 24px */ -.inline-block { - display: inline-block; - zoom: 1; - *display: inline; -} -.clearfix { - *zoom: 1; -} -.clearfix:before, -.clearfix:after { - display: table; - content: ""; -} -.clearfix:after { - clear: both; -} -.drop-ie-gradient { - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.dropdown-arrow-inverse { - border-bottom-color: #34495e !important; - border-top-color: #34495e !important; -} -.demo-headline { - padding: 73px 0 110px; - text-align: center; -} -.demo-logo { - font-size: 90px; - font-weight: 900; - letter-spacing: -2px; - line-height: 100px; -} -.demo-logo .logo { - background: url(../img/demo/logo-mask.png) center 0 no-repeat; - background-size: 256px 186px; - height: 186px; - margin: 0 auto 26px; - overflow: hidden; - text-indent: -9999em; - width: 256px; -} -.demo-logo small { - color: rgba(52, 73, 94, 0.30000000000000004); - display: block; - font-size: 22px; - font-weight: 700; - letter-spacing: -1px; - padding-top: 5px; -} -.demo-row { - margin-bottom: 20px; -} -.demo-panel-title { - margin-bottom: 20px; - padding-top: 20px; -} -.demo-panel-title small { - color: #798795; - font-size: inherit; - font-weight: 400; -} -.demo-navigation { - margin-bottom: -4px; - margin-top: -10px; -} -.demo-pager { - margin-top: -10px; -} -.demo-tooltips { - height: 126px; -} -.demo-tooltips .tooltip { - left: -8px !important; - position: relative !important; - top: -8px !important; -} -.demo-headings { - margin-bottom: 12px; -} -.demo-tiles { - margin-bottom: 46px; -} -.demo-icons { - font-size: 32px; - margin-left: -20px; - padding-left: 20px; -} -.demo-icons .demo-content { - margin: 0 0 0 -35px; -} -.demo-icons .demo-content > span { - display: inline-block; - margin: 0 0 32px 35px; - width: 24px; - font-size: 24px; -} -.demo-icons-tooltip { - bottom: 0; - color: #c2c8cf; - font-size: 12px; - left: 100%; - margin-left: 0 !important; - position: absolute; - width: 80px; -} -.demo-illustrations .demo-content { - margin: 0 0 0 -40px; - padding-top: 20px; - *zoom: 1; -} -.demo-illustrations .demo-content:before, -.demo-illustrations .demo-content:after { - display: table; - content: ""; -} -.demo-illustrations .demo-content:after { - clear: both; -} -.demo-illustrations .demo-content > div { - float: left; - width: 100px; - height: 100px; - margin: 0 0 40px 40px; - text-align: center; -} -.demo-illustrations img { - display: inline-block; - max-height: 100px; - max-width: 100px; - vertical-align: baseline; -} -.demo-samples { - margin-bottom: 46px; -} -.demo-video { - padding-top: 95px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.demo-download-section { - float: none; - margin: 0 auto; - padding: 60px 0 90px 20px; - text-align: center; -} -.demo-download-section [class*='fui-'] { - margin: 3px 0 -3px; -} -.demo-download { - background-color: #ebedef; - height: 120px; - margin: 0 auto 32px; - padding: 40px 28px 30px 32px; - text-align: center; - width: 130px; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; -} -.demo-download img { - height: 104px; - width: 82px; -} -.demo-download-text { - font-size: 15px; - padding: 20px 0; - text-align: center; -} -.demo-text-box a:hover { - color: #1abc9c; -} -.demo-browser { - background: #2c3e50 url(../img/demo/browser.png) 0 0 no-repeat; - background-size: 659px 42px; - color: #ffffff; - margin: 0 41px 140px 0; - padding-top: 42px; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} -.demo-browser-side { - float: left; - padding: 22px 20px; - width: 111px; -} -.demo-browser-side > h5 { - margin-bottom: 3px; - text-transform: none; -} -.demo-browser-side > h6 { - font-size: 11px; - font-weight: 300; - line-height: 18px; - margin-top: 3px; - text-transform: none; -} -.demo-browser-author { - background: url(../img/demo/browser-author.jpg) center center no-repeat; - border: 3px solid #ffffff; - display: block; - height: 84px; - margin: 0 auto; - width: 84px; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; -} -.demo-browser-action { - padding: 30px 0 12px; -} -.demo-browser-action > .btn { - padding: 9px 0 10px 11px !important; - text-align: left; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.demo-browser-action > .btn:before { - color: #ffffff; - content: '\e009'; - font-size: 16px; - font-family: 'Flat-UI-Icons'; - font-weight: 300; - margin-right: 12px; - position: relative; - top: 1px; - -webkit-font-smoothing: antialiased; -} -.demo-browser-content { - background-color: #34495e; - overflow: hidden; - padding: 21px 0 0 20px; - -webkit-border-radius: 0 0 6px; - -moz-border-radius: 0 0 6px; - border-radius: 0 0 6px; -} -.demo-browser-content > img { - border: 6px solid #ffffff; - float: left; - margin: 0 15px 20px 0; - width: 134px; -} -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 2) { - .logo { - background-image: url(../img/demo/logo-mask-2x.png); - } - .demo-browser { - background-image: url(../img/demo/browser-2x.png); - } -} -body { - color: #34495e; - font-family: "Lato", sans-serif; - font-size: 14px; - line-height: 1.231; -} -input, -button, -select, -textarea { - font-family: "Lato", sans-serif; - font-size: 14px; -} -a { - color: #16a085; - text-decoration: underline; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -a:hover { - color: #1abc9c; - text-decoration: none; -} -h1 { - font-size: 32px; - font-weight: 900; -} -h2 { - font-size: 26px; - font-weight: 700; - margin-bottom: 2px; -} -h3 { - font-size: 24px; - font-weight: 700; - margin-bottom: 4px; - margin-top: 2px; -} -h4 { - font-size: 18px; - font-weight: 500; - margin-top: 4px; -} -h5 { - font-size: 16px; - font-weight: 500; - /* text-transform: uppercase;*/ -} -h6 { - font-size: 13px; - font-weight: 500; - /* text-transform: uppercase;*/ -} -.btn, -.btn-group > .btn, -.btn-group > .dropdown-menu, -.btn-group > .popover { - font-size: 14.994px; - /* 15px */ - - font-weight: 500; -} -.btn { - border: none; - background: #bdc3c7; - color: #ffffff; - padding: 9px 12px 10px; - line-height: 22px; - text-decoration: none; - text-shadow: none; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.btn:hover, -.btn:focus, -.btn-group:focus .btn.dropdown-toggle { - background-color: #cacfd2; - color: #ffffff; - outline: none; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.btn:active, -.btn-group.open .btn.dropdown-toggle, -.btn.active { - background-color: #a1a6a9; - color: rgba(255, 255, 255, 0.75); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn.disabled, -.btn[disabled] { - background-color: #bdc3c7; - color: rgba(255, 255, 255, 0.75); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - opacity: 0.7; - filter: alpha(opacity=70); -} -.btn.btn-large { - font-size: 16.996px; - /* 17px */ - - line-height: 20px; - padding: 12px 18px 13px; -} -.btn.btn-large > [class^="fui-"] { - top: 0; -} -.btn.btn-large > [class^="fui-"].pull-right { - margin-right: -2px; -} -.btn.btn-primary { - background-color: #1abc9c; -} -.btn.btn-primary:hover, -.btn.btn-primary:focus, -.btn-group:focus .btn.btn-primary.dropdown-toggle { - background-color: #48c9b0; -} -.btn.btn-primary:active, -.btn-group.open .btn.btn-primary.dropdown-toggle, -.btn.btn-primary.active { - background-color: #16a085; -} -.btn.btn-info { - background-color: #3498db; -} -.btn.btn-info:hover, -.btn.btn-info:focus, -.btn-group:focus .btn.btn-info.dropdown-toggle { - background-color: #5dade2; -} -.btn.btn-info:active, -.btn-group.open .btn.btn-info.dropdown-toggle, -.btn.btn-info.active { - background-color: #2c81ba; -} -.btn.btn-danger { - background-color: #e74c3c; -} -.btn.btn-danger:hover, -.btn.btn-danger:focus, -.btn-group:focus .btn.btn-danger.dropdown-toggle { - background-color: #ec7063; -} -.btn.btn-danger:active, -.btn-group.open .btn.btn-danger.dropdown-toggle, -.btn.btn-danger.active { - background-color: #c44133; -} -.btn.btn-success { - background-color: #2ecc71; -} -.btn.btn-success:hover, -.btn.btn-success:focus, -.btn-group:focus .btn.btn-success.dropdown-toggle { - background-color: #58d68d; -} -.btn.btn-success:active, -.btn-group.open .btn.btn-success.dropdown-toggle, -.btn.btn-success.active { - background-color: #27ad60; -} -.btn.btn-warning { - background-color: #f1c40f; -} -.btn.btn-warning:hover, -.btn.btn-warning:focus, -.btn-group:focus .btn.btn-warning.dropdown-toggle { - background-color: #f5d313; -} -.btn.btn-warning:active, -.btn-group.open .btn.btn-warning.dropdown-toggle, -.btn.btn-warning.active { - background-color: #cda70d; -} -.btn.btn-inverse { - background-color: #34495e; -} -.btn.btn-inverse:hover, -.btn.btn-inverse:focus, -.btn-group:focus .btn.btn-inverse.dropdown-toggle { - background-color: #415b76; -} -.btn.btn-inverse:active, -.btn-group.open .btn.btn-inverse.dropdown-toggle, -.btn.btn-inverse.active { - background-color: #2c3e50; -} -.btn > [class^="fui-"] { - margin: 0 4px; - position: relative; - top: 1px; - vertical-align: top; - display: inline-block; - zoom: 1; - *display: inline; -} -.btn > [class^="fui-"].pull-right { - margin-right: 0px; -} -.btn-toolbar .btn.active { - color: #ffffff; -} -.btn-toolbar .btn:first-child { - -webkit-border-radius: 6px 0 0 6px; - -moz-border-radius: 6px 0 0 6px; - border-radius: 6px 0 0 6px; -} -.btn-toolbar .btn:last-child { - -webkit-border-radius: 0 6px 6px 0; - -moz-border-radius: 0 6px 6px 0; - border-radius: 0 6px 6px 0; -} -.btn-toolbar .btn > [class^="fui-"] { - font-size: 16px; - top: 0; -} -.btn-tip { - font-weight: 300; - padding-left: 10px; -} -.btn-group > .btn { - border-radius: 0; - text-align: center; -} -.btn-group > .btn:active + .btn, -.btn-group > .btn.active + .btn { - border-left-color: transparent; -} -.btn-group > .btn:first-of-type { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; -} -.btn-group > .btn:last-of-type { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} -.btn-group > .btn + .btn { - margin-left: 0; -} -.btn-group > .btn + .dropdown-toggle { - border-left: 2px solid rgba(52, 73, 94, 0.15); - padding-left: 13px; - padding-right: 13px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.btn-group > .btn + .dropdown-toggle .caret { - margin-left: 3px; - margin-right: 3px; -} -.btn-group > .btn.btn-huge + .dropdown-toggle .caret { - margin-left: 7px; - margin-right: 7px; -} -.btn-group > .btn.btn-small + .dropdown-toggle .caret { - margin-left: 0; - margin-right: 0; -} -.caret { - border-left-width: 6px; - border-right-width: 6px; - border-top-width: 8px; - border-bottom-color: #34495e; - border-style: solid; - border-bottom-style: none; - border-top-color: #34495e; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; - -webkit-transform: scale(1.001); - -moz-transform: scale(1.001); - -ms-transform: scale(1.001); - -o-transform: scale(1.001); - transform: scale(1.001); -} -.dropup .caret, -.dropup .btn-large .caret, -.navbar-fixed-bottom .dropdown .caret { - border-bottom-width: 8px; -} -.btn-mini .caret, -.btn-small .caret, -.btn-large .caret { - margin-top: 7px; -} -.btn-large .caret { - border-top-width: 8px; - border-right-width: 6px; - border-left-width: 6px; -} -.navbar { - font-size: 15.988px; - /* 16px */ - -} -.navbar .brand { - border-radius: 6px 0 0 6px; - color: #526476; - font-size: 23.996px; - /* 24px */ - - font-weight: 700; - margin-left: 0; - padding: 23px 28px 24px 32px; - text-shadow: none; -} -.navbar .brand:hover, -.navbar .brand:focus { - color: #1abc9c; -} -.navbar .brand[class*="fui-"] { - font-weight: normal; -} -.navbar .nav { - margin-right: 0; -} -.navbar .nav > li { - position: relative; -} -.navbar .nav > li:hover > ul { - opacity: 1; - top: 100%; - visibility: visible; - z-index: 100; - -webkit-transform: scale(1, 1); - display: block\9; -} -.navbar .nav > li.active > a, -.navbar .nav > li.active > a:hover, -.navbar .nav > li.active > a:focus { - background: none; - color: #1abc9c; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.navbar .nav > li > ul { - padding-top: 13px; - top: 80%; -} -.navbar .nav > li > ul:before { - content: ""; - border-style: solid; - border-width: 0 9px 9px 9px; - border-color: transparent transparent #34495e transparent; - height: 0; - position: absolute; - left: 15px; - top: 5px; - width: 0; - -webkit-transform: rotate(360deg); -} -.navbar .nav > li > ul li:hover ul { - opacity: 1; - -webkit-transform: scale(1, 1); - visibility: visible; - display: block\9; -} -.navbar .nav > li > ul li ul { - left: 100%; -} -.navbar .nav > li > a { - color: #526476; - font-weight: 700; - font-size: 14.994px; - /* 15px */ - - padding: 29px 20px 27px; - text-shadow: none; - -webkit-transition: background-color .25s, color .25s, border-bottom-color .25s; - -moz-transition: background-color .25s, color .25s, border-bottom-color .25s; - -o-transition: background-color .25s, color .25s, border-bottom-color .25s; - transition: background-color .25s, color .25s, border-bottom-color .25s; - -webkit-backface-visibility: hidden; -} -.navbar .nav > li > a:hover, -.navbar .nav > li > a:focus { - color: #1abc9c; -} -.navbar .nav > li > a[class*="fui-"] { - font-size: 24px; - font-weight: normal; -} -.navbar .nav > li > a > [class*="fui-"] { - font-size: 24px; - margin: -4px 0 0; - position: relative; - top: 4px; -} -.navbar .nav > li > a > [class*="fui-"] + * { - margin-left: 12px; -} -.navbar .nav > li:first-child > a { - -webkit-border-radius: 0 0 0 6px; - -moz-border-radius: 0 0 0 6px; - border-radius: 0 0 0 6px; -} -.navbar .nav ul { - border-radius: 4px; - left: 0; - list-style-type: none; - margin-left: 0; - opacity: 0; - position: absolute; - top: 0; - width: 234px; - z-index: -100; - -webkit-transform: scale(1, 0.99); - -webkit-transform-origin: 0 0; - visibility: hidden; - -webkit-transition: 0.3s ease-out; - -moz-transition: 0.3s ease-out; - -o-transition: 0.3s ease-out; - transition: 0.3s ease-out; - -webkit-backface-visibility: hidden; -} -.navbar .nav ul ul { - left: 95%; - padding-left: 5px; -} -.navbar .nav ul li { - background-color: #34495e; - padding: 0 3px 3px; - position: relative; -} -.navbar .nav ul li:first-child { - border-radius: 6px 6px 0 0; - padding-top: 3px; -} -.navbar .nav ul li:last-child { - border-radius: 0 0 6px 6px; -} -.navbar .nav ul li.active > a, -.navbar .nav ul li.active > a:hover, -.navbar .nav ul li.active > a:focus { - background-color: #1abc9c; - color: #ffffff; - padding-left: 9px; - padding-right: 9px; -} -.navbar .nav ul li.active + li > a { - padding-left: 9px; - padding-right: 9px; -} -.navbar .nav ul a { - border-radius: 2px; - color: #ffffff; - display: block; - font-size: 14px; - padding: 6px 9px; - text-decoration: none; -} -.navbar .nav ul a:hover { - background-color: #1abc9c; -} -.navbar .btn-navbar { - background: none; - border: none; - color: #34495e; - margin: 21px 15px 17px; - text-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.navbar .btn-navbar:hover, -.navbar .btn-navbar:focus { - background: none; - color: #1abc9c; -} -.navbar .btn-navbar:before { - content: "\e00c"; - font-family: "Flat-UI-Icons"; - font-size: 21.994px; - font-style: normal; - font-weight: normal; - -webkit-font-smoothing: antialiased; -} -.navbar .btn-navbar .icon-bar { - display: none; -} -.navbar-inner { - background: #eceef0; - border: none; - padding-left: 0; - padding-right: 0; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.navbar-inverse { - font-size: 16.996px; - /* 17px */ - -} -.navbar-inverse .navbar-inner { - background: #34495e; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.navbar-inverse .brand { - border-bottom: 2px solid #2c3e50; - border-right: 2px solid #2c3e50; - color: #ffffff; - padding: 10px 28px 11px 32px; -} -.navbar-inverse .btn-navbar { - color: #ffffff; - margin: 7px 10px; -} -.navbar-inverse .nav > li:first-child.active > a { - padding-left: 20px; -} -.navbar-inverse .nav > li:first-child > a { - border-left: none; -} -.navbar-inverse .nav > li.active > a, -.navbar-inverse .nav > li.active > a:hover, -.navbar-inverse .nav > li.active > a:focus { - background-color: #1abc9c; - border-bottom-color: #16a085; - border-left: none; - color: #ffffff; - padding-left: 22px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.navbar-inverse .nav > li.active + li > a { - border-left: none; - padding-left: 22px; -} -.navbar-inverse .nav > li > a { - font-size: 16.002px; - /* 16px */ - - border-bottom: 2px solid #2c3e50; - border-left: 2px solid #2c3e50; - color: #ffffff; - padding: 16px 20px 15px; -} -.navbar-inverse .nav.pull-right > li > a { - border-radius: 0 6px 6px 0; -} -.navbar-unread, -.navbar-new { - font-family: "Lato", sans-serif; - background-color: #1abc9c; - border-radius: 50%; - color: #ffffff; - font-size: 0; - font-weight: 700; - height: 6px; - line-height: 14px; - position: absolute; - right: 12px; - text-align: center; - top: 28px; - width: 6px; - z-index: 10; -} -.active .navbar-unread, -.active .navbar-new { - background-color: #ffffff; - display: none; -} -.navbar-inverse .navbar-unread, -.navbar-inverse .navbar-new { - top: 15px; -} -.navbar-new { - background-color: #e74c3c; - font-size: 12px; - line-height: 17px; - height: 18px; - margin: -9px -1px; - min-width: 16px; - padding: 0 1px; - width: auto; - -webkit-font-smoothing: subpixel-antialiased; -} -.navbar.navbar-inverse .nav li.dropdown.open > .dropdown-toggle { - background-color: #1abc9c; - border-bottom-color: #16a085; - color: #ffffff; -} -.navbar.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret { - border-bottom-color: #ffffff !important; - border-top-color: #ffffff !important; -} -.navbar .nav li.dropdown.open > .dropdown-toggle { - background: none; - color: #1abc9c; -} -.navbar .nav li.dropdown.open > .dropdown-toggle .caret { - border-bottom-color: #1abc9c !important; - border-top-color: #1abc9c !important; -} -.navbar .nav li.dropdown.open .dropdown-menu { - opacity: 1; - top: 100%; - visibility: visible; - z-index: 1000; - -webkit-transform: none; -} -.navbar .nav li.dropdown > .dropdown-toggle { - outline: none; -} -.navbar .nav li.dropdown > .dropdown-toggle:hover .caret, -.navbar .nav li.dropdown > .dropdown-toggle:focus .caret { - border-bottom-color: #1abc9c; - border-top-color: #1abc9c; -} -.navbar .nav li.dropdown > .dropdown-toggle .caret { - border-left-width: 6px; - border-right-width: 6px; - border-top-width: 8px; - border-bottom-color: #4c6a89; - border-top-color: #4c6a89; - margin-left: 10px; - margin-top: 7px; -} -.navbar .nav li.dropdown .dropdown-menu { - background-color: #34495e; - opacity: 0; - padding: 0; - visibility: hidden; -} -.navbar .nav li.dropdown .dropdown-menu:before { - display: none; -} -.navbar .nav li.dropdown .dropdown-menu:after { - border-bottom-color: #34495e; -} -.navbar .nav li.dropdown .dropdown-menu > li > a { - border-radius: 3px; - color: #ffffff; - padding: 6px 8px 8px; -} -.navbar .nav li.dropdown .dropdown-menu .divider { - background-color: #2c3e50; - border-bottom: none; - margin: 2px 0 5px; - padding: 0; - height: 2px; -} -.select { - display: inline-block; - margin-bottom: 10px; -} -[class*="span"] > .select[class*="span"] { - margin-left: 0; -} -.select[class*="span"] .btn { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.select.select-block { - display: block; - float: none; - margin-left: 0; - width: auto; -} -.select.select-block .btn { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.select .btn { - width: 220px; -} -.select .btn.btn-huge .filter-option { - left: 20px; - right: 40px; - top: 16px; -} -.select .btn.btn-huge .caret { - right: 20px; -} -.select .btn.btn-large .filter-option { - left: 18px; - right: 38px; - top: 12px; -} -.select .btn.btn-small .filter-option { - left: 13px; - right: 33px; - top: 7px; -} -.select .btn.btn-small .caret { - right: 13px; -} -.select .btn.btn-mini .filter-option { - left: 13px; - right: 33px; - top: 5px; -} -.select .btn.btn-mini .caret { - right: 13px; -} -.select .btn .filter-option { - height: 26px; - left: 13px; - overflow: hidden; - position: absolute; - right: 33px; - text-align: left; - top: 10px; -} -.select .btn .caret { - position: absolute; - right: 16px; -} -.select .btn .dropdown-toggle { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.select .btn .dropdown-menu { - min-width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.select .btn .dropdown-menu dt { - cursor: default; - display: block; - padding: 3px 20px; -} -.select .btn .dropdown-menu li:not(.disabled) > a:hover small { - color: rgba(255, 255, 255, 0.004); -} -.select .btn .dropdown-menu li > a { - min-height: 20px; -} -.select .btn .dropdown-menu li > a.opt { - padding-left: 35px; -} -.select .btn .dropdown-menu li small { - padding-left: 0.5em; -} -.select .btn .dropdown-menu li > dt small { - font-weight: normal; -} -.select .btn > .disabled, -.select .btn .dropdown-menu li.disabled > a { - cursor: default; -} -.select .caret { - border-left-width: 6px; - border-right-width: 6px; - border-top-width: 8px; - border-bottom-color: #ffffff; - border-style: solid; - border-bottom-style: none; - border-top-color: #ffffff; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - border: 2px solid #bdc3c7; - color: #34495e; - font-family: "Lato", sans-serif; - font-size: 14px; - padding: 8px 5px; - height: 21px; - text-indent: 6px; - -webkit-appearance: none; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-transition: border .25s linear, color .25s linear; - -moz-transition: border .25s linear, color .25s linear; - -o-transition: border .25s linear, color .25s linear; - transition: border .25s linear, color .25s linear; - -webkit-backface-visibility: hidden; -} -textarea:-moz-placeholder, -input[type="text"]:-moz-placeholder, -input[type="password"]:-moz-placeholder, -input[type="datetime"]:-moz-placeholder, -input[type="datetime-local"]:-moz-placeholder, -input[type="date"]:-moz-placeholder, -input[type="month"]:-moz-placeholder, -input[type="time"]:-moz-placeholder, -input[type="week"]:-moz-placeholder, -input[type="number"]:-moz-placeholder, -input[type="email"]:-moz-placeholder, -input[type="url"]:-moz-placeholder, -input[type="search"]:-moz-placeholder, -input[type="tel"]:-moz-placeholder, -input[type="color"]:-moz-placeholder, -.uneditable-input:-moz-placeholder { - color: #b2bcc5; -} -textarea::-webkit-input-placeholder, -input[type="text"]::-webkit-input-placeholder, -input[type="password"]::-webkit-input-placeholder, -input[type="datetime"]::-webkit-input-placeholder, -input[type="datetime-local"]::-webkit-input-placeholder, -input[type="date"]::-webkit-input-placeholder, -input[type="month"]::-webkit-input-placeholder, -input[type="time"]::-webkit-input-placeholder, -input[type="week"]::-webkit-input-placeholder, -input[type="number"]::-webkit-input-placeholder, -input[type="email"]::-webkit-input-placeholder, -input[type="url"]::-webkit-input-placeholder, -input[type="search"]::-webkit-input-placeholder, -input[type="tel"]::-webkit-input-placeholder, -input[type="color"]::-webkit-input-placeholder, -.uneditable-input::-webkit-input-placeholder { - color: #b2bcc5; -} -textarea.placeholder, -input[type="text"].placeholder, -input[type="password"].placeholder, -input[type="datetime"].placeholder, -input[type="datetime-local"].placeholder, -input[type="date"].placeholder, -input[type="month"].placeholder, -input[type="time"].placeholder, -input[type="week"].placeholder, -input[type="number"].placeholder, -input[type="email"].placeholder, -input[type="url"].placeholder, -input[type="search"].placeholder, -input[type="tel"].placeholder, -input[type="color"].placeholder, -.uneditable-input.placeholder { - color: #b2bcc5; -} -.control-group.focus textarea, -.control-group.focus input[type="text"], -.control-group.focus input[type="password"], -.control-group.focus input[type="datetime"], -.control-group.focus input[type="datetime-local"], -.control-group.focus input[type="date"], -.control-group.focus input[type="month"], -.control-group.focus input[type="time"], -.control-group.focus input[type="week"], -.control-group.focus input[type="number"], -.control-group.focus input[type="email"], -.control-group.focus input[type="url"], -.control-group.focus input[type="search"], -.control-group.focus input[type="tel"], -.control-group.focus input[type="color"], -.control-group.focus .uneditable-input, -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: #1abc9c; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.row-fluid textarea, -.row-fluid input[type="text"], -.row-fluid input[type="password"], -.row-fluid input[type="datetime"], -.row-fluid input[type="datetime-local"], -.row-fluid input[type="date"], -.row-fluid input[type="month"], -.row-fluid input[type="time"], -.row-fluid input[type="week"], -.row-fluid input[type="number"], -.row-fluid input[type="email"], -.row-fluid input[type="url"], -.row-fluid input[type="search"], -.row-fluid input[type="tel"], -.row-fluid input[type="color"], -.row-fluid .uneditable-input { - height: 41px; - width: 100%; -} -textarea.flat, -input[type="text"].flat, -input[type="password"].flat, -input[type="datetime"].flat, -input[type="datetime-local"].flat, -input[type="date"].flat, -input[type="month"].flat, -input[type="time"].flat, -input[type="week"].flat, -input[type="number"].flat, -input[type="email"].flat, -input[type="url"].flat, -input[type="search"].flat, -input[type="tel"].flat, -input[type="color"].flat, -.uneditable-input.flat { - border-color: transparent; -} -textarea.flat:hover, -input[type="text"].flat:hover, -input[type="password"].flat:hover, -input[type="datetime"].flat:hover, -input[type="datetime-local"].flat:hover, -input[type="date"].flat:hover, -input[type="month"].flat:hover, -input[type="time"].flat:hover, -input[type="week"].flat:hover, -input[type="number"].flat:hover, -input[type="email"].flat:hover, -input[type="url"].flat:hover, -input[type="search"].flat:hover, -input[type="tel"].flat:hover, -input[type="color"].flat:hover, -.uneditable-input.flat:hover { - border-color: #bdc3c7; -} -textarea.flat:focus, -input[type="text"].flat:focus, -input[type="password"].flat:focus, -input[type="datetime"].flat:focus, -input[type="datetime-local"].flat:focus, -input[type="date"].flat:focus, -input[type="month"].flat:focus, -input[type="time"].flat:focus, -input[type="week"].flat:focus, -input[type="number"].flat:focus, -input[type="email"].flat:focus, -input[type="url"].flat:focus, -input[type="search"].flat:focus, -input[type="tel"].flat:focus, -input[type="color"].flat:focus, -.uneditable-input.flat:focus { - border-color: #1abc9c; -} -.control-group.error textarea, -.control-group.error input[type="text"], -.control-group.error input[type="password"], -.control-group.error input[type="datetime"], -.control-group.error input[type="datetime-local"], -.control-group.error input[type="date"], -.control-group.error input[type="month"], -.control-group.error input[type="time"], -.control-group.error input[type="week"], -.control-group.error input[type="number"], -.control-group.error input[type="email"], -.control-group.error input[type="url"], -.control-group.error input[type="search"], -.control-group.error input[type="tel"], -.control-group.error input[type="color"], -.control-group.error .uneditable-input { - border-color: #e74c3c; - color: #e74c3c; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.error textarea:focus, -.control-group.error input[type="text"]:focus, -.control-group.error input[type="password"]:focus, -.control-group.error input[type="datetime"]:focus, -.control-group.error input[type="datetime-local"]:focus, -.control-group.error input[type="date"]:focus, -.control-group.error input[type="month"]:focus, -.control-group.error input[type="time"]:focus, -.control-group.error input[type="week"]:focus, -.control-group.error input[type="number"]:focus, -.control-group.error input[type="email"]:focus, -.control-group.error input[type="url"]:focus, -.control-group.error input[type="search"]:focus, -.control-group.error input[type="tel"]:focus, -.control-group.error input[type="color"]:focus, -.control-group.error .uneditable-input:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.success textarea, -.control-group.success input[type="text"], -.control-group.success input[type="password"], -.control-group.success input[type="datetime"], -.control-group.success input[type="datetime-local"], -.control-group.success input[type="date"], -.control-group.success input[type="month"], -.control-group.success input[type="time"], -.control-group.success input[type="week"], -.control-group.success input[type="number"], -.control-group.success input[type="email"], -.control-group.success input[type="url"], -.control-group.success input[type="search"], -.control-group.success input[type="tel"], -.control-group.success input[type="color"], -.control-group.success .uneditable-input { - border-color: #2ecc71; - color: #2ecc71; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.success textarea:focus, -.control-group.success input[type="text"]:focus, -.control-group.success input[type="password"]:focus, -.control-group.success input[type="datetime"]:focus, -.control-group.success input[type="datetime-local"]:focus, -.control-group.success input[type="date"]:focus, -.control-group.success input[type="month"]:focus, -.control-group.success input[type="time"]:focus, -.control-group.success input[type="week"]:focus, -.control-group.success input[type="number"]:focus, -.control-group.success input[type="email"]:focus, -.control-group.success input[type="url"]:focus, -.control-group.success input[type="search"]:focus, -.control-group.success input[type="tel"]:focus, -.control-group.success input[type="color"]:focus, -.control-group.success .uneditable-input:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.warning textarea, -.control-group.warning input[type="text"], -.control-group.warning input[type="password"], -.control-group.warning input[type="datetime"], -.control-group.warning input[type="datetime-local"], -.control-group.warning input[type="date"], -.control-group.warning input[type="month"], -.control-group.warning input[type="time"], -.control-group.warning input[type="week"], -.control-group.warning input[type="number"], -.control-group.warning input[type="email"], -.control-group.warning input[type="url"], -.control-group.warning input[type="search"], -.control-group.warning input[type="tel"], -.control-group.warning input[type="color"], -.control-group.warning .uneditable-input { - border-color: #f1c40f; - color: #f1c40f; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.warning textarea:focus, -.control-group.warning input[type="text"]:focus, -.control-group.warning input[type="password"]:focus, -.control-group.warning input[type="datetime"]:focus, -.control-group.warning input[type="datetime-local"]:focus, -.control-group.warning input[type="date"]:focus, -.control-group.warning input[type="month"]:focus, -.control-group.warning input[type="time"]:focus, -.control-group.warning input[type="week"]:focus, -.control-group.warning input[type="number"]:focus, -.control-group.warning input[type="email"]:focus, -.control-group.warning input[type="url"]:focus, -.control-group.warning input[type="search"]:focus, -.control-group.warning input[type="tel"]:focus, -.control-group.warning input[type="color"]:focus, -.control-group.warning .uneditable-input:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.info textarea, -.control-group.info input[type="text"], -.control-group.info input[type="password"], -.control-group.info input[type="datetime"], -.control-group.info input[type="datetime-local"], -.control-group.info input[type="date"], -.control-group.info input[type="month"], -.control-group.info input[type="time"], -.control-group.info input[type="week"], -.control-group.info input[type="number"], -.control-group.info input[type="email"], -.control-group.info input[type="url"], -.control-group.info input[type="search"], -.control-group.info input[type="tel"], -.control-group.info input[type="color"], -.control-group.info .uneditable-input { - border-color: #3498db; - color: #3498db; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group.info textarea:focus, -.control-group.info input[type="text"]:focus, -.control-group.info input[type="password"]:focus, -.control-group.info input[type="datetime"]:focus, -.control-group.info input[type="datetime-local"]:focus, -.control-group.info input[type="date"]:focus, -.control-group.info input[type="month"]:focus, -.control-group.info input[type="time"]:focus, -.control-group.info input[type="week"]:focus, -.control-group.info input[type="number"]:focus, -.control-group.info input[type="email"]:focus, -.control-group.info input[type="url"]:focus, -.control-group.info input[type="search"]:focus, -.control-group.info input[type="tel"]:focus, -.control-group.info input[type="color"]:focus, -.control-group.info .uneditable-input:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.control-group textarea, -.control-group input[type="text"], -.control-group input[type="password"], -.control-group input[type="datetime"], -.control-group input[type="datetime-local"], -.control-group input[type="date"], -.control-group input[type="month"], -.control-group input[type="time"], -.control-group input[type="week"], -.control-group input[type="number"], -.control-group input[type="email"], -.control-group input[type="url"], -.control-group input[type="search"], -.control-group input[type="tel"], -.control-group input[type="color"], -.control-group .uneditable-input { - margin-bottom: 0; -} -.control-group { - position: relative; -} -.control-group > .input-icon { - position: absolute; - top: 2px; - right: 2px; - line-height: 37px; - vertical-align: middle; - font-size: 19.991999999999997px; - /* 20px */ - - color: #b2bcc5; - background-color: #ffffff; - padding: 0 10px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.control-group input:focus + .input-icon { - color: #34495e; -} -.control-group.huge > .input-icon { - line-height: 49px; -} -.control-group.large > .input-icon { - line-height: 41px; -} -.control-group.small > .input-icon { - font-size: 15.988px; - /* 16px */ - - line-height: 30px; -} -.control-group.success > .input-icon, -.control-group.success input + .input-icon { - color: #2ecc71; -} -.control-group.warning > .input-icon, -.control-group.warning input + .input-icon { - color: #f1c40f; -} -.control-group.error > .input-icon, -.control-group.error input + .input-icon { - color: #e74c3c; -} -.control-group.disabled > .input-icon, -.control-group.disabled input + .input-icon { - color: #d5dbdb; - background-color: #f4f6f6; -} -input[disabled], -input[readonly], -textarea[disabled], -textarea[readonly] { - background-color: #f4f6f6; - border-color: #d5dbdb; - color: #d5dbdb; - cursor: default; -} -input, -textarea, -.uneditable-input { - width: 192px; -} -textarea { - height: auto; - font-size: 14.994px; - /* 15px */ - - line-height: 24px; - padding: 5px 11px; - text-indent: 0; -} -.row-fluid textarea { - height: auto; - width: 100% !important; -} -textarea[class*="span"] { - width: 100% !important; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.checkbox, -.radio { - margin-bottom: 12px; - padding-left: 32px; - position: relative; - -webkit-transition: color 0.25s linear; - -moz-transition: color 0.25s linear; - -o-transition: color 0.25s linear; - transition: color 0.25s linear; - -webkit-backface-visibility: hidden; -} -.checkbox input, -.radio input { - outline: none !important; - display: none; -} -.checkbox .icons, -.radio .icons { - color: #bdc3c7; - display: block; - height: 20px; - left: 0; - position: absolute; - top: 0; - width: 20px; - text-align: center; - line-height: 20px; - font-size: 20px; - -webkit-transition: color 0.25s linear; - -moz-transition: color 0.25s linear; - -o-transition: color 0.25s linear; - transition: color 0.25s linear; - -webkit-backface-visibility: hidden; -} -.checkbox .icons .first-icon-icon, -.radio .icons .first-icon-icon, -.checkbox .icons .second-icon, -.radio .icons .second-icon { - position: absolute; - left: 0; - top: 0; - opacity: 1; - filter: alpha(opacity=100); -} -.checkbox .icons .second-icon, -.radio .icons .second-icon { - opacity: 0; - filter: alpha(opacity=0); -} -.checkbox:hover .first-icon, -.radio:hover .first-icon { - opacity: 0; - filter: alpha(opacity=0); -} -.checkbox:hover .second-icon, -.radio:hover .second-icon { - opacity: 1; - filter: alpha(opacity=100); -} -.checkbox.checked, -.radio.checked { - color: #16a085; -} -.checkbox.checked .icons, -.radio.checked .icons { - color: #1abc9c; -} -.checkbox.checked .first-icon, -.radio.checked .first-icon { - opacity: 0; - filter: alpha(opacity=0); -} -.checkbox.checked .second-icon, -.radio.checked .second-icon { - opacity: 1; - filter: alpha(opacity=100); -} -.checkbox.disabled, -.radio.disabled { - cursor: default; - color: #e6e8ea; -} -.checkbox.disabled .icons, -.radio.disabled .icons { - color: #e6e8ea; -} -.checkbox.disabled .first-icon, -.radio.disabled .first-icon { - opacity: 1; - filter: alpha(opacity=100); -} -.checkbox.disabled .second-icon, -.radio.disabled .second-icon { - opacity: 0; - filter: alpha(opacity=0); -} -.checkbox.disabled.checked .icons, -.radio.disabled.checked .icons { - color: #e6e8ea; -} -.checkbox.disabled.checked .first-icon, -.radio.disabled.checked .first-icon { - opacity: 0; - filter: alpha(opacity=0); -} -.checkbox.disabled.checked .second-icon, -.radio.disabled.checked .second-icon { - opacity: 1; - filter: alpha(opacity=100); -} -.tagsinput { - background: white; - border: 2px solid #1abc9c; - border-radius: 6px; - height: 100px; - margin-bottom: 18px; - padding: 6px 1px 1px 6px; - overflow-y: auto; - text-align: left; -} -.tagsinput .tag { - border-radius: 4px; - background-color: #1abc9c; - color: #ffffff; - cursor: pointer; - margin-right: 5px; - margin-bottom: 5px; - overflow: hidden; - line-height: 15px; - padding: 6px 13px 8px 19px; - position: relative; - vertical-align: middle; - display: inline-block; - zoom: 1; - *display: inline; - -webkit-transition: 0.14s linear; - -moz-transition: 0.14s linear; - -o-transition: 0.14s linear; - transition: 0.14s linear; - -webkit-backface-visibility: hidden; -} -.tagsinput .tag:hover { - background-color: #16a085; - color: #ffffff; - padding-left: 12px; - padding-right: 20px; -} -.tagsinput .tag:hover .tagsinput-remove-link { - color: #ffffff; - opacity: 1; - display: block\9; -} -.tagsinput input { - background: transparent; - border: none; - color: #34495e; - font-family: "Lato", sans-serif; - font-size: 14px; - margin: 0px; - padding: 0 0 0 5px; - outline: 0; - margin-right: 5px; - margin-bottom: 5px; - width: 12px; -} -.tagsinput-remove-link { - bottom: 0; - color: #ffffff; - cursor: pointer; - font-size: 12px; - opacity: 0; - padding: 7px 7px 5px 0; - position: absolute; - right: 0; - text-align: right; - text-decoration: none; - top: 0; - width: 100%; - z-index: 2; - display: none\9; -} -.tagsinput-remove-link:before { - color: #ffffff; - content: "\e00b"; - font-family: "Flat-UI-Icons"; -} -.tagsinput-add-container { - vertical-align: middle; - display: inline-block; - zoom: 1; - *display: inline; -} -.tagsinput-add { - background-color: #d6dbdf; - border-radius: 3px; - color: #ffffff; - cursor: pointer; - margin-bottom: 5px; - padding: 6px 9px; - display: inline-block; - zoom: 1; - *display: inline; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.tagsinput-add:hover { - background-color: #1abc9c; -} -.tagsinput-add:before { - content: "\e009"; - font-family: "Flat-UI-Icons"; -} -.tags_clear { - clear: both; - width: 100%; - height: 0px; -} -.not_valid { - background: #fbd8db !important; - color: #90111a !important; -} -.progress { - background: #ebedef; - border-radius: 32px; - height: 12px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.progress .bar { - background: #1abc9c; - -webkit-box-shadow: none !important; - -moz-box-shadow: none !important; - box-shadow: none !important; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.progress .bar-success { - background-color: #2ecc71; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.progress .bar-warning { - background-color: #f1c40f; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.progress .bar-danger { - background-color: #e74c3c; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.progress .bar-info { - background-color: #3498db; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider { - background: #ebedef; - border-radius: 32px; - height: 12px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); - margin-bottom: 20px; - position: relative; -} -.ui-slider .bar { - background: #1abc9c; - -webkit-box-shadow: none !important; - -moz-box-shadow: none !important; - box-shadow: none !important; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider .bar-success { - background-color: #2ecc71; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider .bar-warning { - background-color: #f1c40f; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider .bar-danger { - background-color: #e74c3c; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider .bar-info { - background-color: #3498db; - filter: unquote("progid:DXImageTransform.Microsoft.gradient(enabled = false)"); -} -.ui-slider-handle { - background-color: #16a085; - border-radius: 50%; - cursor: pointer; - height: 18px; - margin-left: -9px; - position: absolute; - top: -3px; - width: 18px; - z-index: 2; - -webkit-transition: background 0.25s; - -moz-transition: background 0.25s; - -o-transition: background 0.25s; - transition: background 0.25s; - -webkit-backface-visibility: hidden; -} -.ui-slider-handle[style*='100'] { - margin-left: -15px; -} -.ui-slider-handle:hover, -.ui-slider-handle:focus { - background-color: #48c9b0; - outline: none; -} -.ui-slider-handle:active { - background-color: #16a085; -} -.ui-slider-range { - background-color: #1abc9c; - border-radius: 30px 0 0 30px; - display: block; - height: 100%; - position: absolute; - z-index: 1; -} -.ui-slider-segment { - background-color: #d9dbdd; - border-radius: 50%; - float: left; - height: 6px; - margin: 3px -6px 0 0; - width: 6px; -} -.ui-slider-value { - float: right; - font-weight: 500; - margin-top: 12px; -} -.ui-slider-value.first { - clear: left; - float: left; -} -.pager { - background-color: #34495e; - border-radius: 6px; - color: #ffffff; - font-size: 16px; - font-weight: 700; - display: inline-block; - zoom: 1; - *display: inline; -} -.pager li:first-child > a, -.pager li:first-child > span { - border-left: none; - -webkit-border-radius: 6px 0 0 6px; - -moz-border-radius: 6px 0 0 6px; - border-radius: 6px 0 0 6px; -} -.pager li.pager-center { - padding: 9px 15px 10px; - padding-left: 0; - padding-right: 0; - display: inline-block; - zoom: 1; - *display: inline; -} -.pager li > a, -.pager li > span { - background: none; - border: none; - border-left: 2px solid #2c3e50; - color: #ffffff; - padding: 9px 15px 10px; - text-decoration: none; - white-space: nowrap; - -webkit-border-radius: 0 6px 6px 0; - -moz-border-radius: 0 6px 6px 0; - border-radius: 0 6px 6px 0; -} -.pager li > a:hover, -.pager li > span:hover, -.pager li > a:focus, -.pager li > span:focus { - background-color: #2c3e50; -} -.pager li > a:active, -.pager li > span:active { - background-color: #2c3e50; -} -.pager li > a [class*="fui-"] + span, -.pager li > span [class*="fui-"] + span { - margin-left: 8px; -} -.pager li > a span + [class*="fui-"], -.pager li > span span + [class*="fui-"] { - margin-left: 8px; -} -.pagination { - position: relative; -} -.pagination ul { - background: #d6dbdf; - color: #ffffff; - vertical-align: top; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.pagination ul li { - display: inline-block; - margin-right: -3px; - vertical-align: top; -} -.pagination ul li.active > a, -.pagination ul li.active > span { - background-color: #1abc9c; - color: #ffffff; -} -.pagination ul li.active.previous > a, -.pagination ul li.active.next > a, -.pagination ul li.active.previous > span, -.pagination ul li.active.next > span { - margin: 0; -} -.pagination ul li.active.previous > a, -.pagination ul li.active.next > a, -.pagination ul li.active.previous > span, -.pagination ul li.active.next > span, -.pagination ul li.active.previous > a:hover, -.pagination ul li.active.next > a:hover, -.pagination ul li.active.previous > span:hover, -.pagination ul li.active.next > span:hover, -.pagination ul li.active.previous > a:focus, -.pagination ul li.active.next > a:focus, -.pagination ul li.active.previous > span:focus, -.pagination ul li.active.next > span:focus { - background-color: #1abc9c; - color: #ffffff; -} -.pagination ul li:first-child { - -webkit-border-radius: 6px 0 0 6px; - -moz-border-radius: 6px 0 0 6px; - border-radius: 6px 0 0 6px; -} -.pagination ul li:first-child > a, -.pagination ul li:first-child > span { - -webkit-border-radius: 6px 0 0 6px; - -moz-border-radius: 6px 0 0 6px; - border-radius: 6px 0 0 6px; -} -.pagination ul li:first-child.previous + li > a, -.pagination ul li:first-child.previous + li > span { - border-left-width: 5px; -} -.pagination ul li:first-child > a, -.pagination ul li:first-child > span { - border-left: none; -} -.pagination ul li:last-child { - margin-right: 0; - -webkit-border-radius: 0 6px 6px 0; - -moz-border-radius: 0 6px 6px 0; - border-radius: 0 6px 6px 0; -} -.pagination ul li:last-child > a, -.pagination ul li:last-child > span, -.pagination ul li:last-child > a:hover, -.pagination ul li:last-child > span:hover, -.pagination ul li:last-child > a:focus, -.pagination ul li:last-child > span:focus { - -webkit-border-radius: 0 6px 6px 0; - -moz-border-radius: 0 6px 6px 0; - border-radius: 0 6px 6px 0; -} -.pagination ul li.previous > a, -.pagination ul li.next > a, -.pagination ul li.previous > span, -.pagination ul li.next > span { - background: transparent; - border: none; - border-right: 2px solid #e4e7ea; - font-size: 15.988px; - /* 16px */ - - margin: 0 9px 0 0; - padding: 12px 17px; - min-width: auto; - -webkit-border-radius: 6px 0 0 6px; - -moz-border-radius: 6px 0 0 6px; - border-radius: 6px 0 0 6px; - -webkit-box-shadow: none !important; - -moz-box-shadow: none !important; - box-shadow: none !important; -} -.pagination ul li.previous > a, -.pagination ul li.next > a, -.pagination ul li.previous > span, -.pagination ul li.next > span, -.pagination ul li.previous > a:hover, -.pagination ul li.next > a:hover, -.pagination ul li.previous > span:hover, -.pagination ul li.next > span:hover, -.pagination ul li.previous > a:focus, -.pagination ul li.next > a:focus, -.pagination ul li.previous > span:focus, -.pagination ul li.next > span:focus { - border-color: #e4e7ea !important; -} -.pagination ul li.next { - margin-left: 9px; -} -.pagination ul li.next > a, -.pagination ul li.next > span { - border-left: 2px solid #e4e7ea; - border-right: none; - margin: 0; - -webkit-border-radius: 0 6px 6px 0; - -moz-border-radius: 0 6px 6px 0; - border-radius: 0 6px 6px 0; -} -.pagination ul li.active > a, -.pagination ul li.active > span { - background-color: #ffffff; - border-color: #ffffff; - border-width: 2px !important; - color: #d6dbdf; - margin: 10px 5px 9px; -} -.pagination ul li.active > a:hover, -.pagination ul li.active > span:hover, -.pagination ul li.active > a:focus, -.pagination ul li.active > span:focus { - background-color: #ffffff; - border-color: #ffffff; - color: #d6dbdf; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -.pagination ul li.active.previous, -.pagination ul li.active.next { - border-color: #e4e7ea; -} -.pagination ul li.active.previous { - margin-right: 6px; -} -.pagination ul li > a, -.pagination ul li > span { - background: #ffffff; - border: 5px solid #d6dbdf; - color: #ffffff; - line-height: 16px; - min-height: 17px; - min-width: auto; - outline: none; - padding: 0 4px; - margin: 7px 2px 6px; - text-align: center; - -webkit-border-radius: 50px; - -moz-border-radius: 50px; - border-radius: 50px; - -webkit-transition: background 0.2s ease-out, border-color 0s ease-out, color 0.2s ease-out; - -moz-transition: background 0.2s ease-out, border-color 0s ease-out, color 0.2s ease-out; - -o-transition: background 0.2s ease-out, border-color 0s ease-out, color 0.2s ease-out; - transition: background 0.2s ease-out, border-color 0s ease-out, color 0.2s ease-out; - -webkit-backface-visibility: hidden; -} -.pagination ul li > a:hover, -.pagination ul li > span:hover, -.pagination ul li > a:focus, -.pagination ul li > span:focus { - background-color: #1abc9c; - border-color: #1abc9c; - color: #ffffff; - -webkit-transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out; - -moz-transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out; - -o-transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out; - transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out; - -webkit-backface-visibility: hidden; -} -.pagination ul li > a:active, -.pagination ul li > span:active { - background-color: #16a085; - border-color: #16a085; - color: #ffffff; -} -.pagination > .btn.previous, -.pagination > .btn.next { - margin-right: 8px; - font-size: 14px; - padding-left: 23px; - padding-right: 23px; -} -.pagination > .btn.previous [class*="fui-"], -.pagination > .btn.next [class*="fui-"] { - font-size: 16px; - margin-left: -2px; - margin-top: -2px; -} -.pagination > .btn.next { - margin-left: 8px; - margin-right: 0; -} -.pagination > .btn.next [class*="fui-"] { - margin-right: -2px; - margin-left: 4px; -} -.tooltip { - font-size: 14px; -} -.tooltip.in { - opacity: 1; -} -.tooltip.top { - padding-bottom: 9px; -} -.tooltip.top .tooltip-arrow { - border-top-color: #34495e; - border-width: 9px 9px 0; - bottom: 0; - margin-left: -9px; -} -.tooltip.right .tooltip-arrow { - border-right-color: #34495e; - border-width: 9px 9px 9px 0; - margin-top: -9px; - left: -3px; -} -.tooltip.bottom { - padding-top: 8px; -} -.tooltip.bottom .tooltip-arrow { - border-bottom-color: #34495e; - border-width: 0 9px 9px; - margin-left: -9px; - top: -1px; -} -.tooltip.left .tooltip-arrow { - border-left-color: #34495e; - border-width: 9px 0 9px 9px; - margin-top: -9px; - right: -3px; -} -.tooltip-inner { - background-color: #34495e; - line-height: 17.99px; - padding: 12px 12px; - text-align: center; - width: 183px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.dropdown-menu { - background-color: #f3f4f5; - border: none; - display: block; - margin-top: 8px; - opacity: 0; - padding: 0; - visibility: hidden; - width: 100%; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.dropdown-menu.typeahead { - display: none; - opacity: 1; - visibility: visible; - width: auto; - margin-top: 2px; -} -.open > .dropdown-menu { - margin-top: 18px; - opacity: 1; - visibility: visible; -} -.dropdown-menu li:first-child dt + a { - border-radius: 0; -} -.dropdown-menu li:first-child > a { - border-radius: 6px 6px 0 0; - padding-top: 8px; -} -.dropdown-menu li:last-child > a { - border-radius: 0 0 6px 6px; - padding-bottom: 10px; -} -.dropdown-menu li.active > a, -.dropdown-menu li.selected > a, -.dropdown-menu li.active > a.highlighted, -.dropdown-menu li.selected > a.highlighted { - background: #1abc9c; - color: #ffffff; -} -.dropdown-menu li.active > a:hover, -.dropdown-menu li.selected > a:hover, -.dropdown-menu li.active > a.highlighted:hover, -.dropdown-menu li.selected > a.highlighted:hover, -.dropdown-menu li.active > a:focus, -.dropdown-menu li.selected > a:focus, -.dropdown-menu li.active > a.highlighted:focus, -.dropdown-menu li.selected > a.highlighted:focus { - background: #16a085; - color: #ffffff; -} -.dropdown-menu li > a { - color: rgba(52, 73, 94, 0.75); - padding: 6px 15px 8px; - text-decoration: none; - *zoom: 1; - -webkit-transition: background-color 0.25s; - -moz-transition: background-color 0.25s; - -o-transition: background-color 0.25s; - transition: background-color 0.25s; - -webkit-backface-visibility: hidden; -} -.dropdown-menu li > a:before, -.dropdown-menu li > a:after { - display: table; - content: ""; -} -.dropdown-menu li > a:after { - clear: both; -} -.dropdown-menu li > a:hover, -.dropdown-menu li > a:active, -.dropdown-menu li > a:focus { - background: #e1e4e7; - color: inherit; - outline: none; -} -.dropdown-menu li > a.highlighted { - background: #c9cfd4; - color: #ffffff; -} -.dropdown-menu li > a.highlighted:hover, -.dropdown-menu li > a.highlighted:focus { - background: #bac1c8; - color: #ffffff; -} -.dropdown-menu li > a:before { - float: right; - margin-top: 3px; -} -.dropdown-menu li dt { - font-weight: 300; - margin-bottom: 3px; - margin-top: 12px; - padding: 0 15px; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - margin-bottom: 8px; -} -.dropup .dropdown-arrow, -.navbar-fixed-bottom .dropdown .dropdown-arrow { - border-bottom: none; - border-top: 8px outset #f3f4f5; - bottom: 100%; - top: auto; -} -.navbar-fixed-bottom .nav > li > ul:before { - border-bottom: none; - border-top: 9px outset #34495e; - bottom: 4px; - top: auto; -} -.open.dropup > .dropdown-menu { - margin-bottom: 18px; -} -.open.dropup > .dropdown-arrow { - margin-bottom: 10px; -} -.open.dropup > .dropdown-arrow.dropdown-arrow-inverse { - border-top-color: #34495e; -} -.open > .dropdown-arrow { - margin-top: 9px; - opacity: 1; -} -.dropdown-arrow { - border-style: solid; - border-width: 0 9px 9px 9px; - border-color: transparent transparent #f3f4f5 transparent; - height: 0; - margin-top: 0; - opacity: 0; - position: absolute; - right: 13px; - top: 100%; - width: 0; - z-index: 10; - -webkit-transform: rotate(360deg); - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.dropdown-inverse { - background-color: #34495e; - color: #cccccc; - padding: 4px 0 6px; -} -.dropdown-inverse li { - margin: 0 4px -2px; -} -.dropdown-inverse li:first-child > a, -.dropdown-inverse li:last-child > a { - border-radius: 2px; - padding-bottom: 7px; - padding-top: 5px; -} -.dropdown-inverse li:first-child dt + a, -.dropdown-inverse li:last-child dt + a { - border-radius: 2px; -} -.dropdown-inverse li.active > a, -.dropdown-inverse li.selected > a { - background: #1abc9c; - color: #ffffff; - position: relative; - z-index: 1; -} -.dropdown-inverse li dt { - padding-left: 11px; - padding-right: 11px; -} -.dropdown-inverse li .divider { - margin-left: 11px; - margin-right: 11px; -} -.dropdown-inverse li > a { - border-radius: 2px; - color: #ffffff; - padding: 5px 11px 7px; -} -.dropdown-inverse li > a:hover, -.dropdown-inverse li > a:active, -.dropdown-inverse li > a:focus { - background: #2c3e50; -} -.dropdown-inverse li > a.highlighted { - background: #526476; -} -.dropdown-inverse li > a.highlighted:hover, -.dropdown-inverse li > a.highlighted:focus { - background: #677786; -} -.dropdown-inverse li .divider { - background-color: #526476; - border-bottom-color: #526476; -} -/* ============================================================ - * bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru - * http://www.larentis.eu/switch/ - * ============================================================ - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * ============================================================ */ -.has-switch { - border-radius: 30px; - display: inline-block; - cursor: pointer; - line-height: 1.231; - overflow: hidden; - position: relative; - text-align: left; - width: 80px; - -webkit-mask: url('../img/switch/mask.png') 0 0 no-repeat; - mask: url('../img/switch/mask.png') 0 0 no-repeat; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} -.has-switch.deactivate { - opacity: 0.5; - filter: alpha(opacity=50); - cursor: default !important; -} -.has-switch.deactivate label, -.has-switch.deactivate span { - cursor: default !important; -} -.has-switch > div { - width: 162%; - position: relative; - top: 0; -} -.has-switch > div.switch-animate { - -webkit-transition: left 0.25s ease-out; - -moz-transition: left 0.25s ease-out; - -o-transition: left 0.25s ease-out; - transition: left 0.25s ease-out; - -webkit-backface-visibility: hidden; -} -.has-switch > div.switch-off { - left: -63%; -} -.has-switch > div.switch-off label { - background-color: #7f8c9a; - border-color: #bdc3c7; - -webkit-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); - -moz-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); - box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); -} -.has-switch > div.switch-on { - left: 0%; -} -.has-switch > div.switch-on label { - background-color: #1abc9c; -} -.has-switch input[type=checkbox] { - display: none; -} -.has-switch span { - cursor: pointer; - font-size: 14.994px; - font-weight: 700; - float: left; - height: 29px; - line-height: 19px; - margin: 0; - padding-bottom: 6px; - padding-top: 5px; - position: relative; - text-align: center; - width: 50%; - z-index: 1; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: 0.25s ease-out; - -moz-transition: 0.25s ease-out; - -o-transition: 0.25s ease-out; - transition: 0.25s ease-out; - -webkit-backface-visibility: hidden; -} -.has-switch span.switch-left { - border-radius: 30px 0 0 30px; - background-color: #34495e; - color: #1abc9c; - border-left: 1px solid transparent; -} -.has-switch span.switch-right { - border-radius: 0 30px 30px 0; - background-color: #bdc3c7; - color: #ffffff; - text-indent: 7px; -} -.has-switch span.switch-right [class*="fui-"] { - text-indent: 0; -} -.has-switch label { - border: 4px solid #34495e; - border-radius: 50%; - float: left; - height: 21px; - margin: 0 -15px 0 -14px; - padding: 0; - position: relative; - vertical-align: middle; - width: 21px; - z-index: 100; - -webkit-transition: 0.25s ease-out; - -moz-transition: 0.25s ease-out; - -o-transition: 0.25s ease-out; - transition: 0.25s ease-out; - -webkit-backface-visibility: hidden; -} -.switch-square { - border-radius: 6px; - -webkit-mask: url('../img/switch/mask.png') 0 0 no-repeat; - mask: url('../img/switch/mask.png') 0 0 no-repeat; -} -.switch-square > div.switch-off label { - border-color: #7f8c9a; - border-radius: 6px 0 0 6px; -} -.switch-square span.switch-left { - border-radius: 6px 0 0 6px; -} -.switch-square span.switch-left [class*="fui-"] { - text-indent: -10px; -} -.switch-square span.switch-right { - border-radius: 0 6px 6px 0; -} -.switch-square span.switch-right [class*="fui-"] { - text-indent: 5px; -} -.switch-square label { - border-radius: 0 6px 6px 0; - border-color: #1abc9c; -} -.share { - background-color: #eff0f2; - position: relative; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.share:before { - content: ""; - border-style: solid; - border-width: 0 9px 9px 9px; - border-color: transparent transparent #eff0f2 transparent; - height: 0; - position: absolute; - left: 23px; - top: -9px; - width: 0; - -webkit-transform: rotate(360deg); -} -.share ul { - list-style-type: none; - margin: 0; - padding: 15px; -} -.share li { - padding-top: 11px; - *zoom: 1; -} -.share li:before, -.share li:after { - display: table; - content: ""; -} -.share li:after { - clear: both; -} -.share li:first-child { - padding-top: 0; -} -.share .toggle { - float: right; - margin: 0; -} -.share .btn { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} -.share-label { - float: left; - font-size: 15px; - padding-top: 5px; - width: 50%; -} -.palette { - color: #ffffff; - margin: 0; - padding: 15px; - text-transform: uppercase; -} -.palette dt { - display: block; - font-weight: 500; - opacity: 0.8; - filter: alpha(opacity=80); -} -.palette dd { - font-weight: 200; - margin-left: 0; - opacity: 0.8; - filter: alpha(opacity=80); -} -.palette-turquoise { - background-color: #1abc9c; -} -.palette-green-sea { - background-color: #16a085; -} -.palette-emerald { - background-color: #2ecc71; -} -.palette-nephritis { - background-color: #27ae60; -} -.palette-peter-river { - background-color: #3498db; -} -.palette-belize-hole { - background-color: #2980b9; -} -.palette-amethyst { - background-color: #9b59b6; -} -.palette-wisteria { - background-color: #8e44ad; -} -.palette-wet-asphalt { - background-color: #34495e; -} -.palette-midnight-blue { - background-color: #2c3e50; -} -.palette-sun-flower { - background-color: #f1c40f; -} -.palette-orange { - background-color: #f39c12; -} -.palette-carrot { - background-color: #e67e22; -} -.palette-pumpkin { - background-color: #d35400; -} -.palette-alizarin { - background-color: #e74c3c; -} -.palette-pomegranate { - background-color: #c0392b; -} -.palette-clouds { - background-color: #ecf0f1; -} -.palette-silver { - background-color: #bdc3c7; -} -.palette-concrete { - background-color: #95a5a6; -} -.palette-asbestos { - background-color: #7f8c8d; -} -.palette-clouds { - color: #bdc3c7; -} -.palette-paragraph { - color: #7f8c8d; - font-size: 12px; - line-height: 17px; -} -.palette-paragraph span { - color: #bdc3c7; -} -.palette-headline { - color: #7f8c8d; - font-weight: 700; - margin-top: -5px; -} -.tile { - background-color: #eff0f2; - border-radius: 6px; - padding: 14px; - position: relative; - text-align: center; -} -.tile.tile-hot:before { - background: url(../img/tile/ribbon.png) 0 0 no-repeat; - background-size: 82px 82px; - content: ''; - height: 82px; - position: absolute; - right: -4px; - top: -4px; - width: 82px; -} -.tile p { - font-size: 15px; - margin-bottom: 33px; -} -.tile-image { - height: 100px; - margin: 31px 0 27px; - vertical-align: bottom; -} -.tile-image.big-illustration { - height: 111px; - margin-top: 20px; - width: 112px; -} -.tile-title { - font-size: 20px; - margin: 0; -} -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 2) { - .tile.tile-hot:before { - background-image: url(../img/tile/ribbon-2x.png); - } -} -.todo { - background-color: #2c3e50; - color: #798795; - margin-bottom: 20px; - -webkit-border-radius: 8px 8px 6px 6px; - -moz-border-radius: 8px 8px 6px 6px; - border-radius: 8px 8px 6px 6px; -} -.todo ul { - margin: 0; - list-style-type: none; -} -.todo li { - background: #34495e url(../img/todo/todo.png) 92% center no-repeat; - background-size: 20px 20px; - cursor: pointer; - margin-top: 2px; - padding: 18px 42px 17px 25px; - position: relative; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.todo li:first-child { - margin-top: 0; -} -.todo li:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - padding-bottom: 18px; -} -.todo li.todo-done { - background: transparent url(../img/todo/done.png) 92% center no-repeat; - background-size: 20px 20px; - color: #1abc9c; -} -.todo li.todo-done .todo-name { - color: #1abc9c; -} -.todo-search { - position: relative; - background: #1abc9c; - background-size: 16px 16px; - border-radius: 6px 6px 0 0; - color: #34495e; - padding: 19px 25px 20px; -} -.todo-search:before { - position: absolute; - font-family: 'Flat-UI-Icons'; - content: "\e01c"; - font-size: 16px; - display: inline-block; - top: 50%; - left: 92%; - margin: -0.5em 0 0 -1em; -} -input.todo-search-field { - background: none; - border: none; - color: #34495e; - font-size: 19px; - font-weight: 700; - margin: 0; - line-height: 23px; - padding: 5px 0; - text-indent: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -input.todo-search-field:-moz-placeholder { - color: #34495e; -} -input.todo-search-field::-webkit-input-placeholder { - color: #34495e; -} -input.todo-search-field.placeholder { - color: #34495e; -} -.todo-icon { - float: left; - font-size: 24px; - padding: 11px 22px 0 0; -} -.todo-content { - padding-top: 1px; - overflow: hidden; -} -.todo-name { - color: #ffffff; - font-size: 17px; - margin: 1px 0 3px; -} -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 2) { - .todo li { - background-image: url(../img/todo/todo-2x.png); - } - .todo li.todo-done { - background-image: url(../img/todo/done-2x.png); - } -} -footer { - background-color: #edeff1; - color: #bac1c8; - font-size: 15px; - padding: 0; -} -footer a { - color: #9aa4af; - font-weight: 700; -} -footer p { - font-size: 15px; - line-height: 20px; -} -.footer-title { - margin: 0 0 22px; - padding-top: 21px; -} -.footer-brand { - display: block; - margin-bottom: 26px; - width: 220px; -} -.footer-brand img { - width: 216px; -} -.footer-banner { - background-color: #1abc9c; - color: #d1f2eb; - margin-left: 42px; - min-height: 286px; - padding: 0 30px 30px; -} -.footer-banner .footer-title { - color: #ffffff; -} -.footer-banner a { - color: #b7f5e9; - text-decoration: underline; -} -.footer-banner a:hover { - text-decoration: none; -} -.footer-banner ul { - list-style-type: none; - margin: 0 0 26px; -} -.footer-banner ul li { - border-top: 1px solid #1bc5a3; - line-height: 19px; - padding: 6px 0; -} -.footer-banner ul li:first-child { - border-top: none; - padding-top: 1px; -} -.video-js { - background-color: transparent; - margin-top: -95px; - position: relative; - padding: 0; - font-size: 10px; - vertical-align: middle; - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - backface-visibility: hidden; -} -.video-js .vjs-tech { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} -.video-js:-moz-full-screen { - position: absolute; -} -body.vjs-full-window { - padding: 0; - margin: 0; - height: 100%; - overflow-y: auto; -} -.video-js.vjs-fullscreen { - position: fixed; - overflow: hidden; - z-index: 1000; - left: 0; - top: 0; - bottom: 0; - right: 0; - width: 100% !important; - height: 100% !important; - _position: absolute; -} -.video-js:-webkit-full-screen { - width: 100% !important; - height: 100% !important; -} -.vjs-poster { - margin: 0 auto; - padding: 0; - cursor: pointer; - position: relative; - width: 100%; - max-height: 100%; - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; -} -.video-js .vjs-text-track-display { - text-align: center; - position: absolute; - bottom: 4em; - left: 1em; - right: 1em; - font-family: "Lato", sans-serif; -} -.video-js .vjs-text-track { - display: none; - color: #ffffff; - font-size: 1.4em; - text-align: center; - margin-bottom: .1em; - background: #000; - background: rgba(0, 0, 0, 0.5); -} -.video-js .vjs-subtitles { - color: #fff; -} -.video-js .vjs-captions { - color: #fc6; -} -.vjs-tt-cue { - display: block; -} -.vjs-fade-in { - visibility: visible !important; - opacity: 1 !important; - -webkit-transition: visibility 0s linear 0s, opacity .3s linear; - -moz-transition: visibility 0s linear 0s, opacity .3s linear; - -o-transition: visibility 0s linear 0s, opacity .3s linear; - transition: visibility 0s linear 0s, opacity .3s linear; - -webkit-backface-visibility: hidden; -} -.vjs-fade-out { - visibility: hidden !important; - opacity: 0 !important; - -webkit-transition: visibility 0s linear 1.5s, opacity 1.5s linear; - -moz-transition: visibility 0s linear 1.5s, opacity 1.5s linear; - -o-transition: visibility 0s linear 1.5s, opacity 1.5s linear; - transition: visibility 0s linear 1.5s, opacity 1.5s linear; - -webkit-backface-visibility: hidden; -} -.vjs-controls { - position: absolute; - bottom: -47px; - left: 0; - right: 0; - margin: 0; - padding: 0; - height: 47px; - color: #ffffff; - background: #273747; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} -.vjs-controls.vjs-fade-out { - visibility: visible !important; - opacity: 1 !important; -} -.vjs-control { - background-position: center center; - background-repeat: no-repeat; - position: relative; - float: left; - text-align: center; - margin: 0; - padding: 0; - height: 18px; - width: 18px; -} -.vjs-control:focus { - outline: 0; -} -.vjs-control div { - background-position: center center; - background-repeat: no-repeat; -} -.vjs-control-text { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.vjs-play-control { - cursor: pointer !important; - height: 47px; - left: 0; - position: absolute; - top: 0; - width: 58px; -} -.vjs-play-control div { - position: relative; - height: 47px; -} -.vjs-play-control div:before, -.vjs-play-control div:after { - position: absolute; - font-family: "Flat-UI-Icons"; - color: #1abc9c; - font-size: 16px; - top: 50%; - left: 50%; - margin: -0.55em 0 0 -0.5em; - -webkit-transition: color .25s, opacity .25s; - -moz-transition: color .25s, opacity .25s; - -o-transition: color .25s, opacity .25s; - transition: color .25s, opacity .25s; - -webkit-backface-visibility: hidden; -} -.vjs-play-control div:after { - content: "\e03b"; -} -.vjs-play-control div:before { - content: "\e03c"; -} -.vjs-paused .vjs-play-control:hover div:before { - color: #16a085; -} -.vjs-paused .vjs-play-control div:after { - opacity: 0; - filter: alpha(opacity=0); -} -.vjs-paused .vjs-play-control div:before { - opacity: 1; - filter: alpha(opacity=100); -} -.vjs-playing .vjs-play-control:hover div:after { - color: #16a085; -} -.vjs-playing .vjs-play-control div:after { - opacity: 1; - filter: alpha(opacity=100); -} -.vjs-playing .vjs-play-control div:before { - opacity: 0; - filter: alpha(opacity=0); -} -.vjs-rewind-control { - width: 5em; - cursor: pointer !important; -} -.vjs-rewind-control div { - width: 19px; - height: 16px; - background: none transparent; - margin: .5em auto 0; -} -.vjs-mute-control { - background: url(../img/video/volume-full.png) center -48px no-repeat; - background-size: 16px 64px; - cursor: pointer !important; - position: absolute; - right: 51px; - top: 14px; -} -.vjs-mute-control:hover div, -.vjs-mute-control:focus div { - opacity: 0; -} -.vjs-mute-control.vjs-vol-0, -.vjs-mute-control.vjs-vol-0 div { - background-image: url(../img/video/volume-off.png); -} -.vjs-mute-control div { - background: #273747 url(../img/video/volume-full.png) no-repeat center 2px; - background-size: 16px 64px; - height: 18px; - -webkit-transition: opacity 0.25s; - -moz-transition: opacity 0.25s; - -o-transition: opacity 0.25s; - transition: opacity 0.25s; - -webkit-backface-visibility: hidden; -} -.vjs-volume-control, -.vjs-volume-level, -.vjs-volume-handle, -.vjs-volume-bar { - display: none; -} -.vjs-progress-control { - position: absolute; - left: 60px; - right: 180px; - height: 12px; - width: auto; - top: 18px; - background: #425669; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - border-radius: 32px; -} -.vjs-progress-holder { - position: relative; - cursor: pointer !important; - padding: 0; - margin: 0; - height: 12px; -} -.vjs-play-progress, -.vjs-load-progress { - position: absolute; - display: block; - height: 12px; - margin: 0; - padding: 0; - left: 0; - top: 0; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - border-radius: 32px; -} -.vjs-play-progress { - background: #1abc9c; - left: -1px; -} -.vjs-load-progress { - background: #d6dbdf; - -webkit-border-radius: 32px 0 0 32px; - -moz-border-radius: 32px 0 0 32px; - border-radius: 32px 0 0 32px; -} -.vjs-load-progress[style*='100%'], -.vjs-load-progress[style*='99%'] { - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - border-radius: 32px; -} -.vjs-seek-handle { - background-color: #16a085; - position: absolute; - width: 18px; - height: 18px; - margin: -3px 0 0 1px; - left: 0; - top: 0; - -webkit-transition: background-color 0.25s; - -moz-transition: background-color 0.25s; - -o-transition: background-color 0.25s; - transition: background-color 0.25s; - -webkit-backface-visibility: hidden; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; -} -.vjs-seek-handle[style*='95.'] { - margin-left: 3px; -} -.vjs-seek-handle[style='left: 0%;'] { - margin-left: -2px; -} -.vjs-seek-handle:hover, -.vjs-seek-handle:focus { - background-color: #148d75; -} -.vjs-seek-handle:active { - background-color: #117a65; -} -.vjs-time-controls { - position: absolute; - height: 20px; - width: 50px; - top: 16px; - font: 300 13px "Lato", sans-serif; -} -.vjs-current-time { - right: 128px; - text-align: right; -} -.vjs-duration { - color: #5d6d7e; - right: 69px; - text-align: left; -} -.vjs-remaining-time { - display: none; -} -.vjs-time-divider { - color: #5d6d7e; - font-size: 14px; - position: absolute; - right: 121px; - top: 15px; -} -.vjs-secondary-controls { - float: right; -} -.vjs-fullscreen-control { - background-image: url(../img/video/fullscreen.png); - background-position: center -47px; - background-size: 15px 64px; - cursor: pointer !important; - position: absolute; - right: 17px; - top: 13px; -} -.vjs-fullscreen-control:hover div, -.vjs-fullscreen-control:focus div { - opacity: 0; -} -.vjs-fullscreen-control div { - height: 18px; - background: url(../img/video/fullscreen.png) no-repeat center 2px; - background-size: 15px 64px; - -webkit-transition: opacity 0.25s; - -moz-transition: opacity 0.25s; - -o-transition: opacity 0.25s; - transition: opacity 0.25s; - -webkit-backface-visibility: hidden; -} -.vjs-menu-button { - display: none !important; -} -@-webkit-keyframes sharp { - 0% { - background: #e74c3c; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - 50% { - background: #ebedee; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -ms-transform: rotate(180deg); - -o-transform: rotate(180deg); - transform: rotate(180deg); - } - 100% { - background: #e74c3c; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-moz-keyframes sharp { - 0% { - background: #e74c3c; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - 50% { - background: #ebedee; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -ms-transform: rotate(180deg); - -o-transform: rotate(180deg); - transform: rotate(180deg); - } - 100% { - background: #e74c3c; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-o-keyframes sharp { - 0% { - background: #e74c3c; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - 50% { - background: #ebedee; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -ms-transform: rotate(180deg); - -o-transform: rotate(180deg); - transform: rotate(180deg); - } - 100% { - background: #e74c3c; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes sharp { - 0% { - background: #e74c3c; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - 50% { - background: #ebedee; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -ms-transform: rotate(180deg); - -o-transform: rotate(180deg); - transform: rotate(180deg); - } - 100% { - background: #e74c3c; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.vjs-loading-spinner { - background: #ebedee; - display: none; - height: 16px; - left: 50%; - margin: -8px 0 0 -8px; - position: absolute; - top: 50%; - width: 16px; - -webkit-animation: sharp 2s ease infinite; - -moz-animation: sharp 2s ease infinite; - -o-animation: sharp 2s ease infinite; - animation: sharp 2s ease infinite; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; -} -.login { - background: url(../img/login/imac.png) 0 0 no-repeat; - background-size: 940px 778px; - color: #ffffff; - margin-bottom: 77px; - padding: 38px 38px 267px; - position: relative; -} -.login-screen { - background-color: #1abc9c; - min-height: 317px; - padding: 123px 199px 33px 306px; -} -.login-icon { - left: 200px; - position: absolute; - top: 160px; - width: 96px; -} -.login-icon > img { - display: block; - margin-bottom: 6px; - width: 100%; -} -.login-icon > h4 { - font-size: 17px; - font-weight: 200; - line-height: 34px; - opacity: 0.95; - filter: alpha(opacity=95); -} -.login-icon > h4 small { - color: inherit; - display: block; - font-size: inherit; - font-weight: 700; -} -.login-form { - background-color: #edeff1; - padding: 24px 23px 20px; - position: relative; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.login-form:before { - content: ''; - border-style: solid; - border-width: 12px 12px 12px 0; - border-color: transparent #edeff1 transparent transparent; - height: 0; - position: absolute; - left: -12px; - top: 35px; - width: 0; - -webkit-transform: rotate(360deg); -} -.login-form .control-group { - margin-bottom: 6px; - position: relative; -} -.login-form .login-field { - border-color: transparent; - font-size: 17px; - padding-bottom: 11px; - padding-top: 11px; - text-indent: 3px; - width: 299px; - margin-bottom: 10px !important; -} -.login-form .login-field:focus + .login-field-icon { - color: #1abc9c; -} -.login-form .login-field-icon { - color: #bfc9ca; - font-size: 16px; - position: absolute; - right: 13px; - top: 14px; - -webkit-transition: 0.25s; - -moz-transition: 0.25s; - -o-transition: 0.25s; - transition: 0.25s; - -webkit-backface-visibility: hidden; -} -.login-link { - color: #bfc9ca; - display: block; - font-size: 13px; - margin-top: 15px; - text-align: center; -} -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 2) { - .login { - background-image: url(../img/login/imac-2x.png); - } -} -.last-col { - overflow: hidden; -} -.ptn, -.pvn, -.pan { - padding-top: 0; -} -.ptx, -.pvx, -.pax { - padding-top: 3px; -} -.pts, -.pvs, -.pas { - padding-top: 5px; -} -.ptm, -.pvm, -.pam { - padding-top: 10px; -} -.ptl, -.pvl, -.pal { - padding-top: 20px; -} -.prn, -.phn, -.pan { - padding-right: 0; -} -.prx, -.phx, -.pax { - padding-right: 3px; -} -.prs, -.phs, -.pas { - padding-right: 5px; -} -.prm, -.phm, -.pam { - padding-right: 10px; -} -.prl, -.phl, -.pal { - padding-right: 20px; -} -.pbn, -.pvn, -.pan { - padding-bottom: 0; -} -.pbx, -.pvx, -.pax { - padding-bottom: 3px; -} -.pbs, -.pvs, -.pas { - padding-bottom: 5px; -} -.pbm, -.pvm, -.pam { - padding-bottom: 10px; -} -.pbl, -.pvl, -.pal { - padding-bottom: 20px; -} -.pln, -.phn, -.pan { - padding-left: 0; -} -.plx, -.phx, -.pax { - padding-left: 3px; -} -.pls, -.phs, -.pas { - padding-left: 5px; -} -.plm, -.phm, -.pam { - padding-left: 10px; -} -.pll, -.phl, -.pal { - padding-left: 20px; -} -.mtn, -.mvn, -.man { - margin-top: 0px; -} -.mtx, -.mvx, -.max { - margin-top: 3px; -} -.mts, -.mvs, -.mas { - margin-top: 5px; -} -.mtm, -.mvm, -.mam { - margin-top: 10px; -} -.mtl, -.mvl, -.mal { - margin-top: 20px; -} -.mrn, -.mhn, -.man { - margin-right: 0px; -} -.mrx, -.mhx, -.max { - margin-right: 3px; -} -.mrs, -.mhs, -.mas { - margin-right: 5px; -} -.mrm, -.mhm, -.mam { - margin-right: 10px; -} -.mrl, -.mhl, -.mal { - margin-right: 20px; -} -.mbn, -.mvn, -.man { - margin-bottom: 0px; -} -.mbx, -.mvx, -.max { - margin-bottom: 3px; -} -.mbs, -.mvs, -.mas { - margin-bottom: 5px; -} -.mbm, -.mvm, -.mam { - margin-bottom: 10px; -} -.mbl, -.mvl, -.mal { - margin-bottom: 20px; -} -.mln, -.mhn, -.man { - margin-left: 0px; -} -.mlx, -.mhx, -.max { - margin-left: 3px; -} -.mls, -.mhs, -.mas { - margin-left: 5px; -} -.mlm, -.mhm, -.mam { - margin-left: 10px; -} -.mll, -.mhl, -.mal { - margin-left: 20px; -} diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/head.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/head.css deleted file mode 100644 index 009c2a0d..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/head.css +++ /dev/null @@ -1,37 +0,0 @@ -@charset "utf-8"; -/* head.css */ - #head{ width:1080px; overflow:hidden;} - #head .logo{ - background:url(../images/logo.png) no-repeat #f9f9f9; height:70px; width:1080px; - overflow:hidden; border-bottom:5px #71716c solid; margin-bottom:1px; text-indent:-999999px; - } - #head .nav { - background:url(../images/nav-bg.png) repeat-x; height:54px; width:1080px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius:5px; - } - ul.navList{ padding:14px 14px; color:#fff; font-family:"微软雅黑", "宋体";} - ul.navList li{ float:left; display:block;} - ul.navList li a{ display:block; background:url(../images/nav-icon.png) no-repeat;margin:0px 10px;} - ul.navList li a.home{ background-position:0px -1px; text-indent:25px;} - ul.navList li a.apply{ background-position:0px -30px; text-indent:33px;} - ul.navList li a.document{ background-position:0px -59px; text-indent:30px;} - ul.navList li a.support{ background-position:0px -87px; text-indent:30px;} - ul.navList li a.control{ background-position:0px -115px; text-indent:35px;} - /*------------------------------------------------*/ - ul.navList li a:hover{ background:url(../images/nav-iconhover.png) no-repeat;} - ul.navList li a:hover.home{background-position:0px -1px;} - ul.navList li a:hover.apply{ background-position:0px -32px;} - ul.navList li a:hover.document{ background-position:0px -63px;} - ul.navList li a:hover.support{ background-position:0px -90px;} - ul.navList li a:hover.control{ background-position:0px -118px;} - /*------------------------------------------------*/ - ul.navList li.line{background:url(../images/nav-line.png) no-repeat; height:20px; padding:0px;} - - - - ul.navList li a{ color:#fff; font-weight:bolder;} - ul.navList li a:hover{ color:#333; font-weight:bolder;} - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/siderBar.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/siderBar.css deleted file mode 100644 index 168a9fd9..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/siderBar.css +++ /dev/null @@ -1,113 +0,0 @@ -#container .treeView ul { - background: #f7f7f7; - width: 198px; -} - -ul#menu,ul#menu ul { - list-style-type: none; - margin: 0; - padding: 0; -} - -ul#menu a { - display: block; - text-decoration: none; -} - -ul#menu li { - width: 198px; - overflow: hidden; -} - -ul#menu li a { - background: #f7f7f7; - color: #454545; - font-weight: bold; - padding: 0.5em; -} - -ul#menu li a:hover { - background: #e7e7e7; - border-left: 5px #2D9FDA solid; - padding-left: 15px; -} - -ul#menu li a.current { - background: #e7e7e7; - border-left: 5px #2D9FDA solid; - padding-left: 15px; -} - -ul#menu li ul li a { - color: #666; - font-weight: normal; - padding-left: 20px; -} - -ul#menu li ul li a:hover { - background: #e7e7e7; - border-left: 5px #2D9FDA solid; - padding-left: 15px; -} - -ul#menu li ul li a.current { - background: #e7e7e7; - border-left: 5px #dadada solid; - padding-left: 15px; -} - -ul#menu li ul li ul li a{ - color: #666; - font-weight: normal; - padding-left: 40px; -} - -ul#menu li ul li ul li a:hover { - background: #e7e7e7; - border-left: 5px #2D9FDA solid; - padding-left: 35px; -} - -ul#menu li ul li ul li a.current { - background: #e7e7e7; - border-left: 5px #dadada solid; - padding-left: 35px; -} - -a.navhome .icon_home { - background: url(../images/icons.png) no-repeat 0 0; - display: inline-block; - height: 18px; - margin-right: 4px; - vertical-align: middle; - width: 20px; -} - -a.nav1 .icon_home { - background-color: #6699ff; - display: inline-block; - height: 18px; - margin-right: 4px; - vertical-align: middle; - width: 20px; -} - -a.nav2 .icon_home { - /*background-color: #00cc00;*/ - background-color: #99cc33; - display: inline-block; - height: 18px; - margin-right: 4px; - vertical-align: middle; - width: 20px; -} - -a.nav3 .icon_home { - - background-color: #ffcc00; - display: inline-block; - height: 18px; - margin-right: 4px; - vertical-align: middle; - width: 20px; -} diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/template.css b/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/template.css deleted file mode 100644 index 14054227..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/css/template.css +++ /dev/null @@ -1,312 +0,0 @@ -@charset "utf-8"; -/*rest*/ -html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,p,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td - { - margin: 0 auto; - padding: 0px; - border: 0px none; - font-family: Arial, Helvetica, sans-serif, "宋体"; - vertical-align: baseline; -} - -body { - font-size: 12px; - line-height: 22px; - color: #333; -} - -blockquote:before,blockquote:after,q:before,q:after { - content: "" -} - -blockquote,q { - quotes: "" "" -} - -a { - text-decoration: none; -} - -a img { - border: none -} - -* :focus { - outline: 0 -} - -h1,h2,h3,h4,h5,h6 { - font-family: "Microsoft Yahei"; - font-weight: bold; -} - -.clear { - clear: both; -} - -#container { - width: 990px; - overflow: hidden; - height: auto; - background: #fff; - border: 1px #ccc solid; - border-radius: 6px; - margin-top: 25px; - /*margin-top: 100px;*//* on scroll*/ -} -/*headWrap*/ -#headWrap { - width: 100%; - height: 42px; - background: #505050; -} - -.navhead { - width: 960px; - background: url(../images/logo.png) no-repeat; - height: 42px; -} - -.navhead ul { - height: 42px; - line-height: 42px; - margin-left: 50px; -} - -.navhead ul li { - list-style: none; - float: left; -} - -.navhead ul li a { - display: block; - color: #f1f1f1; - font-family: "Microsoft Yahei"; - font-size: 14px; - padding: 0px 10px; -} -/* LoginWrap*/ - -/*treeView*/ -#container .treeView { - float: left; - width: 200px; - padding-left: 2px; - border-right: 1px #ccc solid; -} - -.content { - float: left; - width: 765px; - height: auto; - background: url(../images/right_bg.png) repeat-x #fff; - overflow: hidden; - padding: 10px 10px; -} - -.content h1 { - font-size: 18px; - font-weight: bold; - border-bottom: 1px solid #E5E5E5; - color: #000000; - font-family: "Microsoft Yahei"; - font-size: 20px; - font-weight: 300; - margin-bottom: 15px; - padding-bottom: 15px; -} - -.content h2 { - font-size: 14px; - font-family: "Microsoft Yahei"; - color: #454545; - padding: 10px; - background-color: #EFEFEF; -} - -.content h3 { - background-color: #EFEFEF; - color: #333333; - font-size: 12px; - font-weight: bold; - line-height: 45px; - margin: 16px 0 8px; - padding: 0 0 0 15px; -} - -.content h4 { - background-color: #EFEFEF; - color: #333333; - font-size: 12px; - font-weight: bold; - line-height: 40px; - margin: 16px 0 8px; - padding: 0 0 0 15px; -} - -.content h5 { - background-color: #EFEFEF; - color: #333333; - font-size: 12px; - font-weight: bold; - line-height: 35px; - margin: 16px 0 8px; - padding: 0 0 0 15px; -} - -} -.content .text-section { - width: 704px; - padding: 10px; - line-height: 20px; - word-spacing: 0.1em; - border-bottom: 1px #e1e1e1 solid; - margin-bottom: 15px; -} - -p.section { - padding-bottom: 5px; - text-indent: 20px; -} - -p { - padding-bottom: 5px; - text-indent: 20px; -} - -.imgtxt p.section { - padding: 10px; -} - -p.section_org { - color: #cc -} - -span.remark { - font-size: 11px; - color: #C93; -} -.headtitle{ - width: 300px; - float: left; - font-size: 20px; - color: #fff; - margin-top: 12px; - padding-left: 100px; -} -#footer { - text-shadow: 0 1px 0 #fff; - border-top: 1px solid #e5e5e5; - min-width: 100%; - height: 80px; - margin-top: 10px; -} - -#chapters { - border: 1px #e1e1e1 dashed; - line-height: 20px; - margin-bottom: 15px; - padding: 10px; - width: 704px; - word-spacing: 0.1em; -} - -#chapters ol { - padding: 5px 20px; -} - -#chapters ol li a { - color: #06F; -} - -#chapters ol li a:hover { - color: #06F; - text-decoration: underline; -} - -.text-section ol { - padding: 5px 20px; -} - -p.section_org { - color: #F60; - padding-bottom: 15px; - margin-top: 15px; -} - -p.section_title { - color: #2F6FAB; - margin-bottom: 5px; - padding-top: 10px; -} - -pre { - background-color: #F9F9F9; - border: 1px dashed #2F6FAB; - color: #2F6FAB; - padding: 10px; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; -} - -/*table*/ -.basisTable { - width: 100%; - border: 1px #e1e1e1 solid; - border-collapse: collapse; -} - -.basisTable th { - background: #2E3337; - height: 40px; - line-height: 40px; - text-align: center; - margin-right: 1px; - color: white; - font-weight: bold; - border: solid 1px #e1e1e1; -} - -.basisTable tr td { - text-align: left; - height: 40px; - line-height: 40px; - border: solid 1px #e1e1e1; -} - -.basisTable .troddclass { - background-color: #f9f9f9; -} - - - -/*文字描述+图片*/ - -.imgtxt .imgtxt-img img { - border-top: 3px #454545 solid; - border-bottom: 3px #454545 solid; -} - -.imgtxt ul { - padding: 5px 10px; -} - -.imgtxt ul li { - list-style: none; - line-height: 24px; -} - -.imgtxt ul li ul { - margin-left: 30px; -} - -.imgtxt ul li ul li { - list-style: square; -} - -p { - line-height: 30px; -} \ No newline at end of file diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/am/am_blueprint.jpg b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/am/am_blueprint.jpg deleted file mode 100644 index 51e392bb..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/am/am_blueprint.jpg and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/auth/auth1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/auth/auth1.png deleted file mode 100644 index 869ddd44..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/auth/auth1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppArea.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppArea.png deleted file mode 100644 index 96d53002..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppArea.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppAreaHover.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppAreaHover.png deleted file mode 100644 index 5e88eb44..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgAppAreaHover.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgBody.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgBody.png deleted file mode 100644 index 396cd206..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgBody.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgCurrent.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgCurrent.png deleted file mode 100644 index 22eac4a2..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgCurrent.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgthead.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgthead.gif deleted file mode 100644 index c3663d08..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/bgthead.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/body-bg.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/body-bg.gif deleted file mode 100644 index e016a6ab..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/body-bg.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/boh/boh1_1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/boh/boh1_1.png deleted file mode 100644 index 6fc340ae..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/boh/boh1_1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/cas/cas1.jpg b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/cas/cas1.jpg deleted file mode 100644 index cdc7eb15..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/cas/cas1.jpg and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/current.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/current.gif deleted file mode 100644 index 264329c0..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/current.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/currentT.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/currentT.gif deleted file mode 100644 index 71309c4e..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/currentT.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/favicon.ico b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/favicon.ico deleted file mode 100644 index 51f280f3..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/h5Title.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/h5Title.gif deleted file mode 100644 index a0ab1c4c..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/h5Title.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/iam_blueprint.jpg b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/iam_blueprint.jpg deleted file mode 100644 index 46efc581..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/iam_blueprint.jpg and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icon.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icon.png deleted file mode 100644 index 9be661fa..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icon.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icons.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icons.png deleted file mode 100644 index 00fff133..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/icons.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/idm/idm_blueprint.jpg b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/idm/idm_blueprint.jpg deleted file mode 100644 index 66c01afd..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/idm/idm_blueprint.jpg and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/banner.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/banner.png deleted file mode 100644 index 9725ee5c..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/banner.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/cuetome.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/cuetome.png deleted file mode 100644 index 5cb0146d..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/cuetome.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth1.png deleted file mode 100644 index 31bc9e87..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth2.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth2.png deleted file mode 100644 index 8f91687d..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth2.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth3.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth3.png deleted file mode 100644 index c2416565..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth3.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth4.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth4.png deleted file mode 100644 index caa307b6..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/img/img-oauth4.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/int2_2.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/int2_2.png deleted file mode 100644 index b35340a0..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/int2_2.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/inte3_1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/inte3_1.png deleted file mode 100644 index e692575f..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/inte/inte3_1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/line.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/line.gif deleted file mode 100644 index 68a198bb..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/line.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/list_arrow.gif b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/list_arrow.gif deleted file mode 100644 index b66af2ba..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/list_arrow.gif and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/logo.jpg b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/logo.jpg deleted file mode 100644 index cf28fcfe..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/logo.jpg and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-bg.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-bg.png deleted file mode 100644 index f15b133c..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-bg.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-icon.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-icon.png deleted file mode 100644 index 77eb8023..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-icon.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-iconhover.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-iconhover.png deleted file mode 100644 index 2a7d7f1d..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/nav-iconhover.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/right_bg.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/right_bg.png deleted file mode 100644 index 9d30d088..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/right_bg.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml1.png deleted file mode 100644 index ae96f15a..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2.png deleted file mode 100644 index 89e22fcc..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2_1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2_1.png deleted file mode 100644 index 719f77d7..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml2_1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml3_1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml3_1.png deleted file mode 100644 index ed44704d..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml3_1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_1.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_1.png deleted file mode 100644 index bd64a8cd..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_1.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_2.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_2.png deleted file mode 100644 index 7f7ad4e6..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_2.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_3.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_3.png deleted file mode 100644 index 3bc90e07..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/saml/saml4_3.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/shadowLoginBox.png b/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/shadowLoginBox.png deleted file mode 100644 index b4634ec3..00000000 Binary files a/maxkey-webs/maxkey-web-wiki/src/main/webapp/images/shadowLoginBox.png and /dev/null differ diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/index.jsp b/maxkey-webs/maxkey-web-wiki/src/main/webapp/index.jsp deleted file mode 100644 index 903c44d1..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/index.jsp +++ /dev/null @@ -1,103 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -String lang = "zh_CN"; -if(request.getParameter("language")!=null){ - lang = request.getParameter("language"); -} -%> - - - - - - - - - -
- - - -<% if(lang.equals("zh_CN")){%> -
-

平台概述

- -
-

ConnSec是基于SOA架构的开放的用户账号管理和身份认证平台(Open Identity & Access Platform)。

- -
    -
  1. 提供用户的全生命周期的管理,含了用户的创建、账号的分配和授权、用户的访问审计、身份的清除及终止、用户身份的变更等;

  2. -
  3. 提供基于OpenID Connect、OAuth 2.0、SAML 2.0、CAS、JWT等标准化的开放协议,实现与应用系统之间的单点登录(用户只需要登录认证中心一次就可以访问所有相互信任的应用系统,无需再次登录)。

  4. -
  5. 能够轻松的完成与AD域、 Kerberos/SPNEGO/NTLM、ADFS、RADIUS等登录集成。

  6. -
  7. 提供动态验证码和一次性口令的双因素认证。

  8. -
  9. 支持微信、QQ、新浪微博、Google、Facebook等社交账号的集成。

  10. -
  11. 提供标准的认证接口以便于其他应用集成SSO。

  12. -
  13. 认证中心具有平台无关性、环境多样性,支持Web、手机、移动设备等, 如Apple iOS,Andriod等,将认证能力从B/S到移动应用全面覆盖。

  14. -
  15. 应用集成灵活性高,提供大量的Adapter进行认证的集成,提供的SDK即可完成应用集成,。

  16. -
  17. 提供Connector进行组织、身份账号、用户组的集成;提供定制的开放接口便于用户自定义和扩展,。

  18. -
  19. 两种认证机制并存,各应用系统可保留原有认证机制,同时集成认证中心的认证;应用具有高度独立性,不依赖认证中心,又可用使用认证中心的认证,实现单点登录。

  20. -
-
-
-

身份认证管理蓝图

- 身份认证管理蓝图 -
- -

编制目的

-
-

介绍ConnSec SSO认证平台,提供ConnSec SSO应用集成的技术方法,对系统集成人员进行技术指导与规范。

-
- - -

适用范围

-
-

本文档是ConnSec SSO项目中,指导应用进行SSO集成。

-
- -

阅读对象

-
-

本文档阅读对象为应用集成方项目经理、开发人员、测试人员等。

-
-
- - -<%} else { %> -
-

Platform Overview

- -
-

ConnSec open authentication center, the open authentication platform based on SOA framework, provides the standardized open protocol based on OAuth 2.0 and SAML 2.0, achieve the single sign on between application systems (user can access all the mutual trusted application systems with one sign on of the authentication center without login again); provides the standard authentication interface to facilitate the integration of SSO to other applications.

-

The platform independency, environment diversity of the authentication center supports Web, cell phone, mobile devices as Apple iOS, Andriod, which enhance the authentication capacity from B/S to the full coverage of mobile application.

-

Higher flexibility of the application integration enables the OAuth SDK provided by the authentication center to complete the application integration.

-

The two kinds of authentication mechanism coexist, while each application system can retain the original authentication mechanism as well as integrate the authentication of the authentication center; the application possesses higher independency, it can achieve single sign on by either independent from the authentication center or utilize the authentication of the authentication center.

-
- -

Purpose

-
-

Introduce the ConnSec SSO; provide the technical method of ConnSec SSO application integration to provide technical guidance and standard for the system application technician.

-
- - -

Scope of Application

-
-

This document instructs the application to carry out SSO integration on the ConnSec SSO project.

-
- -

Target Reader

-
-

The target reader of this document shall be the project manager, developer and testing personnel of the application integration party.

-
- -
- - <%} %> -
-
- - - diff --git a/maxkey-webs/maxkey-web-wiki/src/main/webapp/js/jquery-1.9.1.js b/maxkey-webs/maxkey-web-wiki/src/main/webapp/js/jquery-1.9.1.js deleted file mode 100644 index e2c203fe..00000000 --- a/maxkey-webs/maxkey-web-wiki/src/main/webapp/js/jquery-1.9.1.js +++ /dev/null @@ -1,9597 +0,0 @@ -/*! - * jQuery JavaScript Library v1.9.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-2-4 - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<9 - // For `typeof node.method` instead of `node.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.9.1", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, all, a, - input, select, fragment, - opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
a"; - - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", - - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
t
"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})(); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var i, l, thisCache, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - hooks.cur = fn; - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, notxml, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== core_strundefined ) { - ret = elem.getAttribute( name ); - } - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; - -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? - - // Ignore the value *property* by using defaultValue - elem.defaultValue : - - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); - - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - - rnative = /^[^{]+\{\s*\[native code/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Use a stripped-down slice if we can't use a native one -try { - slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - while ( (elem = this[i++]) ) { - results.push( elem ); - } - return results; - }; -} - -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; - - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; - - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; - - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = ""; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; - - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; - } - return compare & 4 ? -1 : 1; - } - - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - var val; - - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self, - len = this.length; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, this[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
", "
" ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - col: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); - - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); - } - - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; - - if ( parent ) { - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - }); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); - } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("