Merge pull request #4 from indigo-iam/merge-remote
Merge updates from source repo into our development branchpull/1611/head
commit
d58c826937
|
@ -1,7 +1,11 @@
|
||||||
language: java
|
language: java
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- oraclejdk11
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.m2
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
Unreleased:
|
Unreleased:
|
||||||
|
|
||||||
|
*1.3.3*:
|
||||||
- Authorization codes are now longer
|
- Authorization codes are now longer
|
||||||
- Client/RS can parse the "sub" and "user_id" claims in introspection response
|
- Client/RS can parse the "sub" and "user_id" claims in introspection response
|
||||||
- Database-direct queries for fetching tokens by user (optimization)
|
- Database-direct queries for fetching tokens by user (optimization)
|
||||||
|
@ -6,9 +8,12 @@ Unreleased:
|
||||||
- Long scopes display properly and are still checkable
|
- Long scopes display properly and are still checkable
|
||||||
- Language system remebers when it can't find a file and stops throwing so many errors
|
- Language system remebers when it can't find a file and stops throwing so many errors
|
||||||
- Index added for refresh tokens
|
- Index added for refresh tokens
|
||||||
- Updated to Spring Security 4.2.4
|
- Updated to Spring Security 4.2.11
|
||||||
|
- Updated Spring to 4.3.22
|
||||||
|
- Change approve pages to use issuer instead of page context
|
||||||
|
- Updated oracle database scripts
|
||||||
|
|
||||||
*1.3.2:
|
*1.3.2*:
|
||||||
- Added changelog
|
- Added changelog
|
||||||
- Set default redirect URI resolver strict matching to true
|
- Set default redirect URI resolver strict matching to true
|
||||||
- Fixed XSS vulnerability on redirect URI display on approval page
|
- Fixed XSS vulnerability on redirect URI display on approval page
|
||||||
|
|
|
@ -28,4 +28,4 @@ The authors and key contributors of the project include:
|
||||||
* [Mark Janssen](https://github.com/praseodym)
|
* [Mark Janssen](https://github.com/praseodym)
|
||||||
|
|
||||||
|
|
||||||
Copyright ©2018, [MIT Internet Trust Consortium](http://www.trust.mit.edu/). Licensed under the Apache 2.0 license, for details see `LICENSE.txt`.
|
Licensed under the Apache 2.0 license, for details see `LICENSE.txt`.
|
||||||
|
|
|
@ -87,6 +87,26 @@
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.activation</groupId>
|
||||||
|
<artifactId>activation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class UriEncodedClientUserDetailsService implements UserDetailsService {
|
||||||
} else {
|
} else {
|
||||||
throw new UsernameNotFoundException("Client not found: " + clientId);
|
throw new UsernameNotFoundException("Client not found: " + clientId);
|
||||||
}
|
}
|
||||||
} catch (InvalidClientException e) {
|
} catch (InvalidClientException e) {
|
||||||
throw new UsernameNotFoundException("Client not found: " + clientId);
|
throw new UsernameNotFoundException("Client not found: " + clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mitre</groupId>
|
<groupId>org.mitre</groupId>
|
||||||
<artifactId>openid-connect-parent</artifactId>
|
<artifactId>openid-connect-parent</artifactId>
|
||||||
<version>1.3.3-SNAPSHOT</version>
|
<version>1.3.5-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>openid-connect-server-webapp</artifactId>
|
<artifactId>openid-connect-server-webapp</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
xmlns:util="http://www.springframework.org/schema/util"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<!-- Scan for components -->
|
<!-- Scan for components -->
|
||||||
<context:component-scan annotation-config="true" base-package="org.mitre" />
|
<context:component-scan annotation-config="true" base-package="org.mitre" />
|
||||||
|
@ -246,9 +246,15 @@
|
||||||
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
|
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="noOpPasswordEncoder" class="org.springframework.security.crypto.password.NoOpPasswordEncoder"/>
|
||||||
|
|
||||||
<security:authentication-manager id="clientAuthenticationManager">
|
<security:authentication-manager id="clientAuthenticationManager">
|
||||||
<security:authentication-provider user-service-ref="clientUserDetailsService" />
|
<security:authentication-provider user-service-ref="clientUserDetailsService">
|
||||||
<security:authentication-provider user-service-ref="uriEncodedClientUserDetailsService" />
|
<security:password-encoder ref="noOpPasswordEncoder"/>
|
||||||
|
</security:authentication-provider>
|
||||||
|
<security:authentication-provider user-service-ref="uriEncodedClientUserDetailsService">
|
||||||
|
<security:password-encoder ref="noOpPasswordEncoder"/>
|
||||||
|
</security:authentication-provider>
|
||||||
</security:authentication-manager>
|
</security:authentication-manager>
|
||||||
|
|
||||||
<security:authentication-manager id="clientAssertionAuthenticationManager">
|
<security:authentication-manager id="clientAssertionAuthenticationManager">
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<!-- validate incoming tokens for JWT assertions -->
|
<!-- validate incoming tokens for JWT assertions -->
|
||||||
<bean id="jwtAssertionValidator" class="org.mitre.jwt.assertion.impl.NullAssertionValidator" />
|
<bean id="jwtAssertionValidator" class="org.mitre.jwt.assertion.impl.NullAssertionValidator" />
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
|
|
||||||
<oauth:authorization-server
|
<oauth:authorization-server
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<bean id="defaultKeyStore" class="org.mitre.jose.keystore.JWKSetKeyStore">
|
<bean id="defaultKeyStore" class="org.mitre.jose.keystore.JWKSetKeyStore">
|
||||||
<property name="location" value="classpath:keystore.jwks" />
|
<property name="location" value="classpath:keystore.jwks" />
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd">
|
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
|
||||||
|
|
||||||
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
||||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
|
|
||||||
<!-- This file allows you to define additional endpoints, it's normally empty in the OIDC server and has entries in the UMA server -->
|
<!-- This file allows you to define additional endpoints, it's normally empty in the OIDC server and has entries in the UMA server -->
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
|
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
|
||||||
<property name="entityManagerFactory" ref="entityManagerFactory" />
|
<property name="entityManagerFactory" ref="entityManagerFactory" />
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
|
|
||||||
<!-- Empty: Override this file in your local project to change configuration options. -->
|
<!-- Empty: Override this file in your local project to change configuration options. -->
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<bean id="configBean" class="org.mitre.openid.connect.config.ConfigurationPropertiesBean">
|
<bean id="configBean" class="org.mitre.openid.connect.config.ConfigurationPropertiesBean">
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<!-- This file has been left blank -->
|
<!-- This file has been left blank -->
|
||||||
<!-- Feel free to override this by using a maven overlay. -->
|
<!-- Feel free to override this by using a maven overlay. -->
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
<meta name="referrer" content="strict-origin-when-cross-origin"/>
|
||||||
|
|
||||||
<!-- stylesheets -->
|
<!-- stylesheets -->
|
||||||
<link href="resources/bootstrap2/css/bootstrap.css" rel="stylesheet">
|
<link href="resources/bootstrap2/css/bootstrap.css" rel="stylesheet">
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:task="http://www.springframework.org/schema/task"
|
xmlns:task="http://www.springframework.org/schema/task"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.3.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
<!-- Configuration for scheduled tasks -->
|
<!-- Configuration for scheduled tasks -->
|
||||||
<task:scheduler id="taskScheduler" pool-size="10" />
|
<task:scheduler id="taskScheduler" pool-size="10" />
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
|
|
||||||
<!-- This file allows you to define components to the UI -->
|
<!-- This file allows you to define components to the UI -->
|
||||||
|
|
|
@ -24,15 +24,16 @@
|
||||||
xmlns:security="http://www.springframework.org/schema/security"
|
xmlns:security="http://www.springframework.org/schema/security"
|
||||||
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<security:authentication-manager id="authenticationManager">
|
<security:authentication-manager id="authenticationManager">
|
||||||
<security:authentication-provider>
|
<security:authentication-provider>
|
||||||
<security:jdbc-user-service data-source-ref="dataSource"/>
|
<security:jdbc-user-service data-source-ref="dataSource"/>
|
||||||
|
<security:password-encoder ref="noOpPasswordEncoder"/>
|
||||||
</security:authentication-provider>
|
</security:authentication-provider>
|
||||||
</security:authentication-manager>
|
</security:authentication-manager>
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form name="confirmationForm"
|
<form name="confirmationForm"
|
||||||
action="${pageContext.request.contextPath.endsWith('/') ? pageContext.request.contextPath : pageContext.request.contextPath.concat('/') }authorize" method="post">
|
action="${ config.issuer }${ config.issuer.endsWith('/') ? '' : '/' }authorize" method="post">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span5 offset1 well-small" style="text-align: left">
|
<div class="span5 offset1 well-small" style="text-align: left">
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form name="confirmationForm"
|
<form name="confirmationForm"
|
||||||
action="${pageContext.request.contextPath.endsWith('/') ? pageContext.request.contextPath : pageContext.request.contextPath.concat('/') }device/approve" method="post">
|
action="${ config.issuer }${ config.issuer.endsWith('/') ? '' : '/' }device/approve" method="post">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span5 offset1 well-small" style="text-align: left">
|
<div class="span5 offset1 well-small" style="text-align: left">
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -304,7 +304,7 @@ public class DiscoveryEndpoint {
|
||||||
JWSAlgorithm.ES256, JWSAlgorithm.ES384, JWSAlgorithm.ES512,
|
JWSAlgorithm.ES256, JWSAlgorithm.ES384, JWSAlgorithm.ES512,
|
||||||
JWSAlgorithm.PS256, JWSAlgorithm.PS384, JWSAlgorithm.PS512,
|
JWSAlgorithm.PS256, JWSAlgorithm.PS384, JWSAlgorithm.PS512,
|
||||||
Algorithm.NONE);
|
Algorithm.NONE);
|
||||||
ArrayList<String> grantTypes = Lists.newArrayList("authorization_code", "implicit", "urn:ietf:params:oauth:grant-type:jwt-bearer", "client_credentials", "urn:ietf:params:oauth:grant_type:redelegate", "urn:ietf:params:oauth:grant-type:device_code");
|
ArrayList<String> grantTypes = Lists.newArrayList("authorization_code", "implicit", "urn:ietf:params:oauth:grant-type:jwt-bearer", "client_credentials", "urn:ietf:params:oauth:grant_type:redelegate", "urn:ietf:params:oauth:grant-type:device_code","refresh_token");
|
||||||
|
|
||||||
Map<String, Object> m = new HashMap<>();
|
Map<String, Object> m = new HashMap<>();
|
||||||
m.put("issuer", config.getIssuer());
|
m.put("issuer", config.getIssuer());
|
||||||
|
|
|
@ -103,9 +103,9 @@ public class OAuthConfirmationController {
|
||||||
|
|
||||||
@PreAuthorize("hasRole('ROLE_USER')")
|
@PreAuthorize("hasRole('ROLE_USER')")
|
||||||
@RequestMapping("/oauth/confirm_access")
|
@RequestMapping("/oauth/confirm_access")
|
||||||
public String confimAccess(Map<String, Object> model, @ModelAttribute("authorizationRequest") AuthorizationRequest authRequest,
|
public String confirmAccess(Map<String, Object> model, Principal p) {
|
||||||
Principal p) {
|
|
||||||
|
|
||||||
|
AuthorizationRequest authRequest = (AuthorizationRequest) model.get("authorizationRequest");
|
||||||
// Check the "prompt" parameter to see if we need to do special processing
|
// Check the "prompt" parameter to see if we need to do special processing
|
||||||
|
|
||||||
String prompt = (String)authRequest.getExtensions().get(PROMPT);
|
String prompt = (String)authRequest.getExtensions().get(PROMPT);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -58,431 +58,397 @@ import com.google.gson.JsonSyntaxException;
|
||||||
@RequestMapping(value = ProtectedResourceRegistrationEndpoint.URL)
|
@RequestMapping(value = ProtectedResourceRegistrationEndpoint.URL)
|
||||||
public class ProtectedResourceRegistrationEndpoint {
|
public class ProtectedResourceRegistrationEndpoint {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static final String URL = "resource";
|
public static final String URL = "resource";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ClientDetailsEntityService clientService;
|
private ClientDetailsEntityService clientService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OAuth2TokenEntityService tokenService;
|
private OAuth2TokenEntityService tokenService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemScopeService scopeService;
|
private SystemScopeService scopeService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConfigurationPropertiesBean config;
|
private ConfigurationPropertiesBean config;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OIDCTokenService connectTokenService;
|
private OIDCTokenService connectTokenService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger for this class
|
* Logger for this class
|
||||||
*/
|
*/
|
||||||
private static final Logger logger =
|
private static final Logger logger = LoggerFactory.getLogger(ProtectedResourceRegistrationEndpoint.class);
|
||||||
LoggerFactory.getLogger(ProtectedResourceRegistrationEndpoint.class);
|
|
||||||
|
/**
|
||||||
/**
|
* Create a new Client, issue a client ID, and create a registration access token.
|
||||||
* Create a new Client, issue a client ID, and create a registration access token.
|
* @param jsonString
|
||||||
*
|
* @param m
|
||||||
* @param jsonString
|
* @param p
|
||||||
* @param m
|
* @return
|
||||||
* @param p
|
*/
|
||||||
* @return
|
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
*/
|
public String registerNewProtectedResource(@RequestBody String jsonString, Model m) {
|
||||||
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
|
|
||||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
ClientDetailsEntity newClient = null;
|
||||||
public String registerNewProtectedResource(@RequestBody String jsonString, Model m) {
|
try {
|
||||||
|
newClient = ClientDetailsEntityJsonProcessor.parse(jsonString);
|
||||||
ClientDetailsEntity newClient = null;
|
} catch (JsonSyntaxException e) {
|
||||||
try {
|
// bad parse
|
||||||
newClient = ClientDetailsEntityJsonProcessor.parse(jsonString);
|
// didn't parse, this is a bad request
|
||||||
} catch (JsonSyntaxException e) {
|
logger.error("registerNewProtectedResource failed; submitted JSON is malformed");
|
||||||
// bad parse
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
||||||
// didn't parse, this is a bad request
|
return HttpCodeView.VIEWNAME;
|
||||||
logger.error("registerNewProtectedResource failed; submitted JSON is malformed");
|
}
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
|
||||||
return HttpCodeView.VIEWNAME;
|
if (newClient != null) {
|
||||||
}
|
// it parsed!
|
||||||
|
|
||||||
if (newClient != null) {
|
//
|
||||||
// it parsed!
|
// Now do some post-processing consistency checks on it
|
||||||
|
//
|
||||||
//
|
|
||||||
// Now do some post-processing consistency checks on it
|
// clear out any spurious id/secret (clients don't get to pick)
|
||||||
//
|
newClient.setClientId(null);
|
||||||
|
newClient.setClientSecret(null);
|
||||||
// clear out any spurious id/secret (clients don't get to pick)
|
|
||||||
newClient.setClientId(null);
|
// do validation on the fields
|
||||||
newClient.setClientSecret(null);
|
try {
|
||||||
|
newClient = validateScopes(newClient);
|
||||||
// do validation on the fields
|
newClient = validateAuth(newClient);
|
||||||
try {
|
} catch (ValidationException ve) {
|
||||||
newClient = validateScopes(newClient);
|
// validation failed, return an error
|
||||||
newClient = validateAuth(newClient);
|
m.addAttribute(JsonErrorView.ERROR, ve.getError());
|
||||||
} catch (ValidationException ve) {
|
m.addAttribute(JsonErrorView.ERROR_MESSAGE, ve.getErrorDescription());
|
||||||
// validation failed, return an error
|
m.addAttribute(HttpCodeView.CODE, ve.getStatus());
|
||||||
m.addAttribute(JsonErrorView.ERROR, ve.getError());
|
return JsonErrorView.VIEWNAME;
|
||||||
m.addAttribute(JsonErrorView.ERROR_MESSAGE, ve.getErrorDescription());
|
}
|
||||||
m.addAttribute(HttpCodeView.CODE, ve.getStatus());
|
|
||||||
return JsonErrorView.VIEWNAME;
|
|
||||||
}
|
// no grant types are allowed
|
||||||
|
newClient.setGrantTypes(new HashSet<String>());
|
||||||
|
newClient.setResponseTypes(new HashSet<String>());
|
||||||
// no grant types are allowed
|
newClient.setRedirectUris(new HashSet<String>());
|
||||||
newClient.setGrantTypes(new HashSet<String>());
|
|
||||||
newClient.setResponseTypes(new HashSet<String>());
|
// don't issue tokens to this client
|
||||||
newClient.setRedirectUris(new HashSet<String>());
|
newClient.setAccessTokenValiditySeconds(0);
|
||||||
|
newClient.setIdTokenValiditySeconds(0);
|
||||||
// don't issue tokens to this client
|
newClient.setRefreshTokenValiditySeconds(0);
|
||||||
newClient.setAccessTokenValiditySeconds(0);
|
|
||||||
newClient.setIdTokenValiditySeconds(0);
|
// clear out unused fields
|
||||||
newClient.setRefreshTokenValiditySeconds(0);
|
newClient.setDefaultACRvalues(new HashSet<String>());
|
||||||
|
newClient.setDefaultMaxAge(null);
|
||||||
// clear out unused fields
|
newClient.setIdTokenEncryptedResponseAlg(null);
|
||||||
newClient.setDefaultACRvalues(new HashSet<String>());
|
newClient.setIdTokenEncryptedResponseEnc(null);
|
||||||
newClient.setDefaultMaxAge(null);
|
newClient.setIdTokenSignedResponseAlg(null);
|
||||||
newClient.setIdTokenEncryptedResponseAlg(null);
|
newClient.setInitiateLoginUri(null);
|
||||||
newClient.setIdTokenEncryptedResponseEnc(null);
|
newClient.setPostLogoutRedirectUris(null);
|
||||||
newClient.setIdTokenSignedResponseAlg(null);
|
newClient.setRequestObjectSigningAlg(null);
|
||||||
newClient.setInitiateLoginUri(null);
|
newClient.setRequireAuthTime(null);
|
||||||
newClient.setPostLogoutRedirectUris(null);
|
newClient.setReuseRefreshToken(false);
|
||||||
newClient.setRequestObjectSigningAlg(null);
|
newClient.setSectorIdentifierUri(null);
|
||||||
newClient.setRequireAuthTime(null);
|
newClient.setSubjectType(null);
|
||||||
newClient.setReuseRefreshToken(false);
|
newClient.setUserInfoEncryptedResponseAlg(null);
|
||||||
newClient.setSectorIdentifierUri(null);
|
newClient.setUserInfoEncryptedResponseEnc(null);
|
||||||
newClient.setSubjectType(null);
|
newClient.setUserInfoSignedResponseAlg(null);
|
||||||
newClient.setUserInfoEncryptedResponseAlg(null);
|
|
||||||
newClient.setUserInfoEncryptedResponseEnc(null);
|
// this client has been dynamically registered (obviously)
|
||||||
newClient.setUserInfoSignedResponseAlg(null);
|
newClient.setDynamicallyRegistered(true);
|
||||||
|
|
||||||
// this client has been dynamically registered (obviously)
|
// this client has access to the introspection endpoint
|
||||||
newClient.setDynamicallyRegistered(true);
|
newClient.setAllowIntrospection(true);
|
||||||
|
|
||||||
// this client has access to the introspection endpoint
|
// now save it
|
||||||
newClient.setAllowIntrospection(true);
|
try {
|
||||||
|
ClientDetailsEntity savedClient = clientService.saveNewClient(newClient);
|
||||||
// now save it
|
|
||||||
try {
|
// generate the registration access token
|
||||||
ClientDetailsEntity savedClient = clientService.saveNewClient(newClient);
|
OAuth2AccessTokenEntity token = connectTokenService.createResourceAccessToken(savedClient);
|
||||||
|
tokenService.saveAccessToken(token);
|
||||||
// generate the registration access token
|
|
||||||
OAuth2AccessTokenEntity token = connectTokenService.createResourceAccessToken(savedClient);
|
// send it all out to the view
|
||||||
tokenService.saveAccessToken(token);
|
|
||||||
|
RegisteredClient registered = new RegisteredClient(savedClient, token.getValue(), config.getIssuer() + "resource/" + UriUtils.encodePathSegment(savedClient.getClientId(), "UTF-8"));
|
||||||
// send it all out to the view
|
m.addAttribute("client", registered);
|
||||||
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.CREATED); // http 201
|
||||||
RegisteredClient registered =
|
|
||||||
new RegisteredClient(savedClient, token.getValue(), config.getIssuer() + "resource/"
|
return ClientInformationResponseView.VIEWNAME;
|
||||||
+ UriUtils.encodePathSegment(savedClient.getClientId(), "UTF-8"));
|
} catch (IllegalArgumentException e) {
|
||||||
m.addAttribute("client", registered);
|
logger.error("Couldn't save client", e);
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.CREATED); // http 201
|
|
||||||
|
m.addAttribute(JsonErrorView.ERROR, "invalid_client_metadata");
|
||||||
return ClientInformationResponseView.VIEWNAME;
|
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client due to invalid or inconsistent metadata.");
|
||||||
} catch (IllegalArgumentException e) {
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
||||||
logger.error("Couldn't save client", e);
|
|
||||||
|
return JsonErrorView.VIEWNAME;
|
||||||
m.addAttribute(JsonErrorView.ERROR, "invalid_client_metadata");
|
}
|
||||||
m.addAttribute(JsonErrorView.ERROR_MESSAGE,
|
} else {
|
||||||
"Unable to save client due to invalid or inconsistent metadata.");
|
// didn't parse, this is a bad request
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
logger.error("registerNewClient failed; submitted JSON is malformed");
|
||||||
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
||||||
return JsonErrorView.VIEWNAME;
|
|
||||||
}
|
return HttpCodeView.VIEWNAME;
|
||||||
} else {
|
}
|
||||||
// didn't parse, this is a bad request
|
|
||||||
logger.error("registerNewClient failed; submitted JSON is malformed");
|
}
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
|
||||||
|
private ClientDetailsEntity validateScopes(ClientDetailsEntity newClient) throws ValidationException {
|
||||||
return HttpCodeView.VIEWNAME;
|
// scopes that the client is asking for
|
||||||
}
|
Set<SystemScope> requestedScopes = scopeService.fromStrings(newClient.getScope());
|
||||||
|
|
||||||
}
|
// the scopes that the client can have must be a subset of the dynamically allowed scopes
|
||||||
|
Set<SystemScope> allowedScopes = scopeService.removeRestrictedAndReservedScopes(requestedScopes);
|
||||||
private ClientDetailsEntity validateScopes(ClientDetailsEntity newClient)
|
|
||||||
throws ValidationException {
|
// if the client didn't ask for any, give them the defaults
|
||||||
// scopes that the client is asking for
|
if (allowedScopes == null || allowedScopes.isEmpty()) {
|
||||||
Set<SystemScope> requestedScopes = scopeService.fromStrings(newClient.getScope());
|
allowedScopes = scopeService.getDefaults();
|
||||||
|
}
|
||||||
// the scopes that the client can have must be a subset of the dynamically allowed scopes
|
|
||||||
Set<SystemScope> allowedScopes =
|
newClient.setScope(scopeService.toStrings(allowedScopes));
|
||||||
scopeService.removeRestrictedAndReservedScopes(requestedScopes);
|
|
||||||
|
return newClient;
|
||||||
// if the client didn't ask for any, give them the defaults
|
}
|
||||||
if (allowedScopes == null || allowedScopes.isEmpty()) {
|
|
||||||
allowedScopes = scopeService.getDefaults();
|
/**
|
||||||
}
|
* Get the meta information for a client.
|
||||||
|
* @param clientId
|
||||||
newClient.setScope(scopeService.toStrings(allowedScopes));
|
* @param m
|
||||||
|
* @param auth
|
||||||
return newClient;
|
* @return
|
||||||
}
|
*/
|
||||||
|
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('" + SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
||||||
/**
|
@RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
* Get the meta information for a client.
|
public String readResourceConfiguration(@PathVariable("id") String clientId, Model m, OAuth2Authentication auth) {
|
||||||
*
|
|
||||||
* @param clientId
|
ClientDetailsEntity client = clientService.loadClientByClientId(clientId);
|
||||||
* @param m
|
|
||||||
* @param auth
|
if (client != null && client.getClientId().equals(auth.getOAuth2Request().getClientId())) {
|
||||||
* @return
|
|
||||||
*/
|
// possibly update the token
|
||||||
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('"
|
OAuth2AccessTokenEntity token = fetchValidRegistrationToken(auth, client);
|
||||||
+ SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET,
|
RegisteredClient registered = new RegisteredClient(client, token.getValue(), config.getIssuer() + "resource/" + UriUtils.encodePathSegment(client.getClientId(), "UTF-8"));
|
||||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
|
||||||
public String readResourceConfiguration(@PathVariable("id") String clientId, Model m,
|
// send it all out to the view
|
||||||
OAuth2Authentication auth) {
|
m.addAttribute("client", registered);
|
||||||
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200
|
||||||
ClientDetailsEntity client = clientService.loadClientByClientId(clientId);
|
|
||||||
|
return ClientInformationResponseView.VIEWNAME;
|
||||||
if (client != null && client.getClientId().equals(auth.getOAuth2Request().getClientId())) {
|
|
||||||
|
} else {
|
||||||
// possibly update the token
|
// client mismatch
|
||||||
OAuth2AccessTokenEntity token = fetchValidRegistrationToken(auth, client);
|
logger.error("readResourceConfiguration failed, client ID mismatch: "
|
||||||
|
+ clientId + " and " + auth.getOAuth2Request().getClientId() + " do not match.");
|
||||||
RegisteredClient registered =
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
||||||
new RegisteredClient(client, token.getValue(), config.getIssuer() + "resource/"
|
|
||||||
+ UriUtils.encodePathSegment(client.getClientId(), "UTF-8"));
|
return HttpCodeView.VIEWNAME;
|
||||||
|
}
|
||||||
// send it all out to the view
|
}
|
||||||
m.addAttribute("client", registered);
|
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200
|
/**
|
||||||
|
* Update the metainformation for a given client.
|
||||||
return ClientInformationResponseView.VIEWNAME;
|
* @param clientId
|
||||||
|
* @param jsonString
|
||||||
} else {
|
* @param m
|
||||||
// client mismatch
|
* @param auth
|
||||||
logger.error("readResourceConfiguration failed, client ID mismatch: " + clientId + " and "
|
* @return
|
||||||
+ auth.getOAuth2Request().getClientId() + " do not match.");
|
*/
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('" + SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
||||||
|
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
return HttpCodeView.VIEWNAME;
|
public String updateProtectedResource(@PathVariable("id") String clientId, @RequestBody String jsonString, Model m, OAuth2Authentication auth) {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
ClientDetailsEntity newClient = null;
|
||||||
/**
|
try {
|
||||||
* Update the metainformation for a given client.
|
newClient = ClientDetailsEntityJsonProcessor.parse(jsonString);
|
||||||
*
|
} catch (JsonSyntaxException e) {
|
||||||
* @param clientId
|
// bad parse
|
||||||
* @param jsonString
|
// didn't parse, this is a bad request
|
||||||
* @param m
|
logger.error("updateProtectedResource failed; submitted JSON is malformed");
|
||||||
* @param auth
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
||||||
* @return
|
return HttpCodeView.VIEWNAME;
|
||||||
*/
|
}
|
||||||
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('"
|
|
||||||
+ SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
ClientDetailsEntity oldClient = clientService.loadClientByClientId(clientId);
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.PUT,
|
|
||||||
produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
if (newClient != null && oldClient != null // we have an existing client and the new one parsed
|
||||||
public String updateProtectedResource(@PathVariable("id") String clientId,
|
&& oldClient.getClientId().equals(auth.getOAuth2Request().getClientId()) // the client passed in the URI matches the one in the auth
|
||||||
@RequestBody String jsonString, Model m, OAuth2Authentication auth) {
|
&& oldClient.getClientId().equals(newClient.getClientId()) // the client passed in the body matches the one in the URI
|
||||||
|
) {
|
||||||
|
|
||||||
ClientDetailsEntity newClient = null;
|
// a client can't ask to update its own client secret to any particular value
|
||||||
try {
|
newClient.setClientSecret(oldClient.getClientSecret());
|
||||||
newClient = ClientDetailsEntityJsonProcessor.parse(jsonString);
|
|
||||||
} catch (JsonSyntaxException e) {
|
newClient.setCreatedAt(oldClient.getCreatedAt());
|
||||||
// bad parse
|
|
||||||
// didn't parse, this is a bad request
|
// no grant types are allowed
|
||||||
logger.error("updateProtectedResource failed; submitted JSON is malformed");
|
newClient.setGrantTypes(new HashSet<String>());
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
newClient.setResponseTypes(new HashSet<String>());
|
||||||
return HttpCodeView.VIEWNAME;
|
newClient.setRedirectUris(new HashSet<String>());
|
||||||
}
|
|
||||||
|
// don't issue tokens to this client
|
||||||
ClientDetailsEntity oldClient = clientService.loadClientByClientId(clientId);
|
newClient.setAccessTokenValiditySeconds(0);
|
||||||
|
newClient.setIdTokenValiditySeconds(0);
|
||||||
if (newClient != null && oldClient != null // we have an existing client and the new one parsed
|
newClient.setRefreshTokenValiditySeconds(0);
|
||||||
&& oldClient.getClientId().equals(auth.getOAuth2Request().getClientId()) // the client
|
|
||||||
// passed in the
|
// clear out unused fields
|
||||||
// URI matches the
|
newClient.setDefaultACRvalues(new HashSet<String>());
|
||||||
// one in the auth
|
newClient.setDefaultMaxAge(null);
|
||||||
&& oldClient.getClientId().equals(newClient.getClientId()) // the client passed in the body
|
newClient.setIdTokenEncryptedResponseAlg(null);
|
||||||
// matches the one in the URI
|
newClient.setIdTokenEncryptedResponseEnc(null);
|
||||||
) {
|
newClient.setIdTokenSignedResponseAlg(null);
|
||||||
|
newClient.setInitiateLoginUri(null);
|
||||||
// a client can't ask to update its own client secret to any particular value
|
newClient.setPostLogoutRedirectUris(null);
|
||||||
newClient.setClientSecret(oldClient.getClientSecret());
|
newClient.setRequestObjectSigningAlg(null);
|
||||||
|
newClient.setRequireAuthTime(null);
|
||||||
newClient.setCreatedAt(oldClient.getCreatedAt());
|
newClient.setReuseRefreshToken(false);
|
||||||
|
newClient.setSectorIdentifierUri(null);
|
||||||
// no grant types are allowed
|
newClient.setSubjectType(null);
|
||||||
newClient.setGrantTypes(new HashSet<String>());
|
newClient.setUserInfoEncryptedResponseAlg(null);
|
||||||
newClient.setResponseTypes(new HashSet<String>());
|
newClient.setUserInfoEncryptedResponseEnc(null);
|
||||||
newClient.setRedirectUris(new HashSet<String>());
|
newClient.setUserInfoSignedResponseAlg(null);
|
||||||
|
|
||||||
// don't issue tokens to this client
|
// this client has been dynamically registered (obviously)
|
||||||
newClient.setAccessTokenValiditySeconds(0);
|
newClient.setDynamicallyRegistered(true);
|
||||||
newClient.setIdTokenValiditySeconds(0);
|
|
||||||
newClient.setRefreshTokenValiditySeconds(0);
|
// this client has access to the introspection endpoint
|
||||||
|
newClient.setAllowIntrospection(true);
|
||||||
// clear out unused fields
|
|
||||||
newClient.setDefaultACRvalues(new HashSet<String>());
|
// do validation on the fields
|
||||||
newClient.setDefaultMaxAge(null);
|
try {
|
||||||
newClient.setIdTokenEncryptedResponseAlg(null);
|
newClient = validateScopes(newClient);
|
||||||
newClient.setIdTokenEncryptedResponseEnc(null);
|
newClient = validateAuth(newClient);
|
||||||
newClient.setIdTokenSignedResponseAlg(null);
|
} catch (ValidationException ve) {
|
||||||
newClient.setInitiateLoginUri(null);
|
// validation failed, return an error
|
||||||
newClient.setPostLogoutRedirectUris(null);
|
m.addAttribute(JsonErrorView.ERROR, ve.getError());
|
||||||
newClient.setRequestObjectSigningAlg(null);
|
m.addAttribute(JsonErrorView.ERROR_MESSAGE, ve.getErrorDescription());
|
||||||
newClient.setRequireAuthTime(null);
|
m.addAttribute(HttpCodeView.CODE, ve.getStatus());
|
||||||
newClient.setReuseRefreshToken(false);
|
return JsonErrorView.VIEWNAME;
|
||||||
newClient.setSectorIdentifierUri(null);
|
}
|
||||||
newClient.setSubjectType(null);
|
|
||||||
newClient.setUserInfoEncryptedResponseAlg(null);
|
|
||||||
newClient.setUserInfoEncryptedResponseEnc(null);
|
try {
|
||||||
newClient.setUserInfoSignedResponseAlg(null);
|
// save the client
|
||||||
|
ClientDetailsEntity savedClient = clientService.updateClient(oldClient, newClient);
|
||||||
// this client has been dynamically registered (obviously)
|
|
||||||
newClient.setDynamicallyRegistered(true);
|
// possibly update the token
|
||||||
|
OAuth2AccessTokenEntity token = fetchValidRegistrationToken(auth, savedClient);
|
||||||
// this client has access to the introspection endpoint
|
|
||||||
newClient.setAllowIntrospection(true);
|
RegisteredClient registered = new RegisteredClient(savedClient, token.getValue(), config.getIssuer() + "resource/" + UriUtils.encodePathSegment(savedClient.getClientId(), "UTF-8"));
|
||||||
|
|
||||||
// do validation on the fields
|
// send it all out to the view
|
||||||
try {
|
m.addAttribute("client", registered);
|
||||||
newClient = validateScopes(newClient);
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200
|
||||||
newClient = validateAuth(newClient);
|
|
||||||
} catch (ValidationException ve) {
|
return ClientInformationResponseView.VIEWNAME;
|
||||||
// validation failed, return an error
|
} catch (IllegalArgumentException e) {
|
||||||
m.addAttribute(JsonErrorView.ERROR, ve.getError());
|
logger.error("Couldn't save client", e);
|
||||||
m.addAttribute(JsonErrorView.ERROR_MESSAGE, ve.getErrorDescription());
|
|
||||||
m.addAttribute(HttpCodeView.CODE, ve.getStatus());
|
m.addAttribute(JsonErrorView.ERROR, "invalid_client_metadata");
|
||||||
return JsonErrorView.VIEWNAME;
|
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client due to invalid or inconsistent metadata.");
|
||||||
}
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
||||||
|
|
||||||
|
return JsonErrorView.VIEWNAME;
|
||||||
try {
|
}
|
||||||
// save the client
|
} else {
|
||||||
ClientDetailsEntity savedClient = clientService.updateClient(oldClient, newClient);
|
// client mismatch
|
||||||
|
logger.error("updateProtectedResource" +
|
||||||
// possibly update the token
|
" failed, client ID mismatch: "
|
||||||
OAuth2AccessTokenEntity token = fetchValidRegistrationToken(auth, savedClient);
|
+ clientId + " and " + auth.getOAuth2Request().getClientId() + " do not match.");
|
||||||
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
||||||
RegisteredClient registered =
|
|
||||||
new RegisteredClient(savedClient, token.getValue(), config.getIssuer() + "resource/"
|
return HttpCodeView.VIEWNAME;
|
||||||
+ UriUtils.encodePathSegment(savedClient.getClientId(), "UTF-8"));
|
}
|
||||||
|
}
|
||||||
// send it all out to the view
|
|
||||||
m.addAttribute("client", registered);
|
/**
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200
|
* Delete the indicated client from the system.
|
||||||
|
* @param clientId
|
||||||
return ClientInformationResponseView.VIEWNAME;
|
* @param m
|
||||||
|
* @param auth
|
||||||
} catch (IllegalArgumentException e) {
|
* @return
|
||||||
logger.error("Couldn't save client", e);
|
*/
|
||||||
|
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('" + SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
||||||
m.addAttribute(JsonErrorView.ERROR, "invalid_client_metadata");
|
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
m.addAttribute(JsonErrorView.ERROR_MESSAGE,
|
public String deleteResource(@PathVariable("id") String clientId, Model m, OAuth2Authentication auth) {
|
||||||
"Unable to save client due to invalid or inconsistent metadata.");
|
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); // http 400
|
ClientDetailsEntity client = clientService.loadClientByClientId(clientId);
|
||||||
|
|
||||||
return JsonErrorView.VIEWNAME;
|
if (client != null && client.getClientId().equals(auth.getOAuth2Request().getClientId())) {
|
||||||
}
|
|
||||||
} else {
|
clientService.deleteClient(client);
|
||||||
// client mismatch
|
|
||||||
logger.error("updateProtectedResource" + " failed, client ID mismatch: " + clientId + " and "
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.NO_CONTENT); // http 204
|
||||||
+ auth.getOAuth2Request().getClientId() + " do not match.");
|
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
return HttpCodeView.VIEWNAME;
|
||||||
|
} else {
|
||||||
return HttpCodeView.VIEWNAME;
|
// client mismatch
|
||||||
}
|
logger.error("readClientConfiguration failed, client ID mismatch: "
|
||||||
}
|
+ clientId + " and " + auth.getOAuth2Request().getClientId() + " do not match.");
|
||||||
|
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
||||||
/**
|
|
||||||
* Delete the indicated client from the system.
|
return HttpCodeView.VIEWNAME;
|
||||||
*
|
}
|
||||||
* @param clientId
|
}
|
||||||
* @param m
|
|
||||||
* @param auth
|
private ClientDetailsEntity validateAuth(ClientDetailsEntity newClient) throws ValidationException {
|
||||||
* @return
|
if (newClient.getTokenEndpointAuthMethod() == null) {
|
||||||
*/
|
newClient.setTokenEndpointAuthMethod(AuthMethod.SECRET_BASIC);
|
||||||
@PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('"
|
}
|
||||||
+ SystemScopeService.RESOURCE_TOKEN_SCOPE + "')")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE,
|
if (newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_BASIC ||
|
||||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_JWT ||
|
||||||
public String deleteResource(@PathVariable("id") String clientId, Model m,
|
newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_POST) {
|
||||||
OAuth2Authentication auth) {
|
|
||||||
|
if (Strings.isNullOrEmpty(newClient.getClientSecret())) {
|
||||||
ClientDetailsEntity client = clientService.loadClientByClientId(clientId);
|
// no secret yet, we need to generate a secret
|
||||||
|
newClient = clientService.generateClientSecret(newClient);
|
||||||
if (client != null && client.getClientId().equals(auth.getOAuth2Request().getClientId())) {
|
}
|
||||||
|
} else if (newClient.getTokenEndpointAuthMethod() == AuthMethod.PRIVATE_KEY) {
|
||||||
clientService.deleteClient(client);
|
if (Strings.isNullOrEmpty(newClient.getJwksUri()) && newClient.getJwks() == null) {
|
||||||
|
throw new ValidationException("invalid_client_metadata", "JWK Set URI required when using private key authentication", HttpStatus.BAD_REQUEST);
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.NO_CONTENT); // http 204
|
}
|
||||||
|
|
||||||
return HttpCodeView.VIEWNAME;
|
newClient.setClientSecret(null);
|
||||||
} else {
|
} else if (newClient.getTokenEndpointAuthMethod() == AuthMethod.NONE) {
|
||||||
// client mismatch
|
newClient.setClientSecret(null);
|
||||||
logger.error("readClientConfiguration failed, client ID mismatch: " + clientId + " and "
|
} else {
|
||||||
+ auth.getOAuth2Request().getClientId() + " do not match.");
|
throw new ValidationException("invalid_client_metadata", "Unknown authentication method", HttpStatus.BAD_REQUEST);
|
||||||
m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN); // http 403
|
}
|
||||||
|
return newClient;
|
||||||
return HttpCodeView.VIEWNAME;
|
}
|
||||||
}
|
|
||||||
}
|
private OAuth2AccessTokenEntity fetchValidRegistrationToken(OAuth2Authentication auth, ClientDetailsEntity client) {
|
||||||
|
|
||||||
private ClientDetailsEntity validateAuth(ClientDetailsEntity newClient)
|
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) auth.getDetails();
|
||||||
throws ValidationException {
|
OAuth2AccessTokenEntity token = tokenService.readAccessToken(details.getTokenValue());
|
||||||
if (newClient.getTokenEndpointAuthMethod() == null) {
|
|
||||||
newClient.setTokenEndpointAuthMethod(AuthMethod.SECRET_BASIC);
|
if (config.getRegTokenLifeTime() != null) {
|
||||||
}
|
|
||||||
|
try {
|
||||||
if (newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_BASIC
|
// Re-issue the token if it has been issued before [currentTime - validity]
|
||||||
|| newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_JWT
|
Date validToDate = new Date(System.currentTimeMillis() - config.getRegTokenLifeTime() * 1000);
|
||||||
|| newClient.getTokenEndpointAuthMethod() == AuthMethod.SECRET_POST) {
|
if(token.getJwt().getJWTClaimsSet().getIssueTime().before(validToDate)) {
|
||||||
|
logger.info("Rotating the registration access token for " + client.getClientId());
|
||||||
if (Strings.isNullOrEmpty(newClient.getClientSecret())) {
|
tokenService.revokeAccessToken(token);
|
||||||
// no secret yet, we need to generate a secret
|
OAuth2AccessTokenEntity newToken = connectTokenService.createResourceAccessToken(client);
|
||||||
newClient = clientService.generateClientSecret(newClient);
|
tokenService.saveAccessToken(newToken);
|
||||||
}
|
return newToken;
|
||||||
} else if (newClient.getTokenEndpointAuthMethod() == AuthMethod.PRIVATE_KEY) {
|
} else {
|
||||||
if (Strings.isNullOrEmpty(newClient.getJwksUri()) && newClient.getJwks() == null) {
|
// it's not expired, keep going
|
||||||
throw new ValidationException("invalid_client_metadata",
|
return token;
|
||||||
"JWK Set URI required when using private key authentication", HttpStatus.BAD_REQUEST);
|
}
|
||||||
}
|
} catch (ParseException e) {
|
||||||
|
logger.error("Couldn't parse a known-valid token?", e);
|
||||||
newClient.setClientSecret(null);
|
return token;
|
||||||
} else if (newClient.getTokenEndpointAuthMethod() == AuthMethod.NONE) {
|
}
|
||||||
newClient.setClientSecret(null);
|
} else {
|
||||||
} else {
|
// tokens don't expire, just return it
|
||||||
throw new ValidationException("invalid_client_metadata", "Unknown authentication method",
|
return token;
|
||||||
HttpStatus.BAD_REQUEST);
|
}
|
||||||
}
|
}
|
||||||
return newClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
private OAuth2AccessTokenEntity fetchValidRegistrationToken(OAuth2Authentication auth,
|
|
||||||
ClientDetailsEntity client) {
|
|
||||||
|
|
||||||
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) auth.getDetails();
|
|
||||||
OAuth2AccessTokenEntity token = tokenService.readAccessToken(details.getTokenValue());
|
|
||||||
|
|
||||||
if (config.getRegTokenLifeTime() != null) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
// Re-issue the token if it has been issued before [currentTime - validity]
|
|
||||||
Date validToDate =
|
|
||||||
new Date(System.currentTimeMillis() - config.getRegTokenLifeTime() * 1000);
|
|
||||||
if (token.getJwt().getJWTClaimsSet().getIssueTime().before(validToDate)) {
|
|
||||||
logger.info("Rotating the registration access token for " + client.getClientId());
|
|
||||||
tokenService.revokeAccessToken(token);
|
|
||||||
OAuth2AccessTokenEntity newToken = connectTokenService.createResourceAccessToken(client);
|
|
||||||
tokenService.saveAccessToken(newToken);
|
|
||||||
return newToken;
|
|
||||||
} else {
|
|
||||||
// it's not expired, keep going
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
} catch (ParseException e) {
|
|
||||||
logger.error("Couldn't parse a known-valid token?", e);
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// tokens don't expire, just return it
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,8 @@ public class TestMITREidDataService_1_0 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportRefreshTokens() throws IOException, ParseException {
|
public void testImportRefreshTokens() throws IOException, ParseException {
|
||||||
Date expirationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
|
Date expirationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
when(mockedClient1.getClientId()).thenReturn("mocked_client_1");
|
when(mockedClient1.getClientId()).thenReturn("mocked_client_1");
|
||||||
|
@ -156,7 +157,7 @@ public class TestMITREidDataService_1_0 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(mockedAuthHolder1);
|
token1.setAuthenticationHolder(mockedAuthHolder1);
|
||||||
|
|
||||||
Date expirationDate2 = formatter.parse("2015-01-07T18:31:50.079Z", Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse("2015-01-07T18:31:50.079+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
when(mockedClient2.getClientId()).thenReturn("mocked_client_2");
|
when(mockedClient2.getClientId()).thenReturn("mocked_client_2");
|
||||||
|
@ -181,9 +182,9 @@ public class TestMITREidDataService_1_0 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -258,7 +259,8 @@ public class TestMITREidDataService_1_0 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportAccessTokens() throws IOException, ParseException {
|
public void testImportAccessTokens() throws IOException, ParseException {
|
||||||
Date expirationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
|
Date expirationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
when(mockedClient1.getClientId()).thenReturn("mocked_client_1");
|
when(mockedClient1.getClientId()).thenReturn("mocked_client_1");
|
||||||
|
@ -275,7 +277,7 @@ public class TestMITREidDataService_1_0 {
|
||||||
token1.setScope(ImmutableSet.of("id-token"));
|
token1.setScope(ImmutableSet.of("id-token"));
|
||||||
token1.setTokenType("Bearer");
|
token1.setTokenType("Bearer");
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -307,10 +309,10 @@ public class TestMITREidDataService_1_0 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
||||||
|
|
||||||
|
@ -573,8 +575,9 @@ public class TestMITREidDataService_1_0 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportGrants() throws IOException, ParseException {
|
public void testImportGrants() throws IOException, ParseException {
|
||||||
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090Z", Locale.ENGLISH);
|
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
||||||
when(mockToken1.getId()).thenReturn(1L);
|
when(mockToken1.getId()).thenReturn(1L);
|
||||||
|
@ -588,9 +591,9 @@ public class TestMITREidDataService_1_0 {
|
||||||
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
||||||
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
||||||
|
|
||||||
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090Z", Locale.ENGLISH);
|
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090Z", Locale.ENGLISH);
|
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090Z", Locale.ENGLISH);
|
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ApprovedSite site2 = new ApprovedSite();
|
ApprovedSite site2 = new ApprovedSite();
|
||||||
site2.setId(2L);
|
site2.setId(2L);
|
||||||
|
@ -611,11 +614,11 @@ public class TestMITREidDataService_1_0 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.GRANTS + "\": [" +
|
"\"" + MITREidDataService.GRANTS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090Z\",\"accessDate\":\"2014-09-10T23:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090+00:00\",\"accessDate\":\"2014-09-10T23:49:44.090+00:00\","
|
||||||
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
||||||
+ "\"approvedAccessTokens\":[1]}," +
|
+ "\"approvedAccessTokens\":[1]}," +
|
||||||
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090Z\",\"accessDate\":\"2014-09-11T20:49:44.090Z\","
|
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090+00:00\",\"accessDate\":\"2014-09-11T20:49:44.090+00:00\","
|
||||||
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090Z\",\"userId\":\"user2\","
|
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090+00:00\",\"userId\":\"user2\","
|
||||||
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -828,7 +831,8 @@ public class TestMITREidDataService_1_0 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -851,7 +855,7 @@ public class TestMITREidDataService_1_0 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(holder1);
|
token1.setAuthenticationHolder(holder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -890,9 +894,9 @@ public class TestMITREidDataService_1_0 {
|
||||||
" ]," +
|
" ]," +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
|
|
@ -142,7 +142,8 @@ public class TestMITREidDataService_1_1 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportRefreshTokens() throws IOException, ParseException {
|
public void testImportRefreshTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -158,7 +159,7 @@ public class TestMITREidDataService_1_1 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(mockedAuthHolder1);
|
token1.setAuthenticationHolder(mockedAuthHolder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -184,9 +185,9 @@ public class TestMITREidDataService_1_1 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -261,7 +262,8 @@ public class TestMITREidDataService_1_1 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportAccessTokens() throws IOException, ParseException {
|
public void testImportAccessTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -279,7 +281,7 @@ public class TestMITREidDataService_1_1 {
|
||||||
token1.setScope(ImmutableSet.of("id-token"));
|
token1.setScope(ImmutableSet.of("id-token"));
|
||||||
token1.setTokenType("Bearer");
|
token1.setTokenType("Bearer");
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -311,10 +313,10 @@ public class TestMITREidDataService_1_1 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
||||||
|
|
||||||
|
@ -576,8 +578,9 @@ public class TestMITREidDataService_1_1 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportGrants() throws IOException, ParseException {
|
public void testImportGrants() throws IOException, ParseException {
|
||||||
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090Z", Locale.ENGLISH);
|
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
||||||
when(mockToken1.getId()).thenReturn(1L);
|
when(mockToken1.getId()).thenReturn(1L);
|
||||||
|
@ -591,9 +594,9 @@ public class TestMITREidDataService_1_1 {
|
||||||
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
||||||
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
||||||
|
|
||||||
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090Z", Locale.ENGLISH);
|
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090Z", Locale.ENGLISH);
|
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090Z", Locale.ENGLISH);
|
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ApprovedSite site2 = new ApprovedSite();
|
ApprovedSite site2 = new ApprovedSite();
|
||||||
site2.setId(2L);
|
site2.setId(2L);
|
||||||
|
@ -614,11 +617,11 @@ public class TestMITREidDataService_1_1 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.GRANTS + "\": [" +
|
"\"" + MITREidDataService.GRANTS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090Z\",\"accessDate\":\"2014-09-10T23:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090+00:00\",\"accessDate\":\"2014-09-10T23:49:44.090+00:00\","
|
||||||
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
||||||
+ "\"approvedAccessTokens\":[1]}," +
|
+ "\"approvedAccessTokens\":[1]}," +
|
||||||
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090Z\",\"accessDate\":\"2014-09-11T20:49:44.090Z\","
|
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090+00:00\",\"accessDate\":\"2014-09-11T20:49:44.090+00:00\","
|
||||||
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090Z\",\"userId\":\"user2\","
|
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090+00:00\",\"userId\":\"user2\","
|
||||||
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -830,7 +833,8 @@ public class TestMITREidDataService_1_1 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -853,7 +857,7 @@ public class TestMITREidDataService_1_1 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(holder1);
|
token1.setAuthenticationHolder(holder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -892,9 +896,9 @@ public class TestMITREidDataService_1_1 {
|
||||||
" ]," +
|
" ]," +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
|
|
@ -144,7 +144,8 @@ public class TestMITREidDataService_1_2 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportRefreshTokens() throws IOException, ParseException {
|
public void testImportRefreshTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -160,7 +161,7 @@ public class TestMITREidDataService_1_2 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(mockedAuthHolder1);
|
token1.setAuthenticationHolder(mockedAuthHolder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -186,9 +187,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -263,7 +264,8 @@ public class TestMITREidDataService_1_2 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportAccessTokens() throws IOException, ParseException {
|
public void testImportAccessTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -281,7 +283,7 @@ public class TestMITREidDataService_1_2 {
|
||||||
token1.setScope(ImmutableSet.of("id-token"));
|
token1.setScope(ImmutableSet.of("id-token"));
|
||||||
token1.setTokenType("Bearer");
|
token1.setTokenType("Bearer");
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -313,10 +315,10 @@ public class TestMITREidDataService_1_2 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
||||||
|
|
||||||
|
@ -578,8 +580,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportGrants() throws IOException, ParseException {
|
public void testImportGrants() throws IOException, ParseException {
|
||||||
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090Z", Locale.ENGLISH);
|
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
||||||
when(mockToken1.getId()).thenReturn(1L);
|
when(mockToken1.getId()).thenReturn(1L);
|
||||||
|
@ -593,9 +596,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
||||||
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
||||||
|
|
||||||
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090Z", Locale.ENGLISH);
|
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090Z", Locale.ENGLISH);
|
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090Z", Locale.ENGLISH);
|
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ApprovedSite site2 = new ApprovedSite();
|
ApprovedSite site2 = new ApprovedSite();
|
||||||
site2.setId(2L);
|
site2.setId(2L);
|
||||||
|
@ -616,11 +619,11 @@ public class TestMITREidDataService_1_2 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.GRANTS + "\": [" +
|
"\"" + MITREidDataService.GRANTS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090Z\",\"accessDate\":\"2014-09-10T23:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090+00:00\",\"accessDate\":\"2014-09-10T23:49:44.090+00:00\","
|
||||||
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
||||||
+ "\"approvedAccessTokens\":[1]}," +
|
+ "\"approvedAccessTokens\":[1]}," +
|
||||||
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090Z\",\"accessDate\":\"2014-09-11T20:49:44.090Z\","
|
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090+00:00\",\"accessDate\":\"2014-09-11T20:49:44.090+00:00\","
|
||||||
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090Z\",\"userId\":\"user2\","
|
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090+00:00\",\"userId\":\"user2\","
|
||||||
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -832,7 +835,8 @@ public class TestMITREidDataService_1_2 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -855,7 +859,7 @@ public class TestMITREidDataService_1_2 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(holder1);
|
token1.setAuthenticationHolder(holder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -894,9 +898,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
" ]," +
|
" ]," +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
|
|
@ -147,7 +147,8 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExportRefreshTokens() throws IOException, ParseException {
|
public void testExportRefreshTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -163,7 +164,7 @@ public class TestMITREidDataService_1_3 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(mockedAuthHolder1);
|
token1.setAuthenticationHolder(mockedAuthHolder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -270,7 +271,8 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportRefreshTokens() throws IOException, ParseException {
|
public void testImportRefreshTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -286,7 +288,7 @@ public class TestMITREidDataService_1_3 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(mockedAuthHolder1);
|
token1.setAuthenticationHolder(mockedAuthHolder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -312,9 +314,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -382,7 +384,8 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExportAccessTokens() throws IOException, ParseException {
|
public void testExportAccessTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -400,7 +403,7 @@ public class TestMITREidDataService_1_3 {
|
||||||
token1.setScope(ImmutableSet.of("id-token"));
|
token1.setScope(ImmutableSet.of("id-token"));
|
||||||
token1.setTokenType("Bearer");
|
token1.setTokenType("Bearer");
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -520,7 +523,8 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportAccessTokens() throws IOException, ParseException {
|
public void testImportAccessTokens() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -538,7 +542,7 @@ public class TestMITREidDataService_1_3 {
|
||||||
token1.setScope(ImmutableSet.of("id-token"));
|
token1.setScope(ImmutableSet.of("id-token"));
|
||||||
token1.setTokenType("Bearer");
|
token1.setTokenType("Bearer");
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -570,10 +574,10 @@ public class TestMITREidDataService_1_3 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
"\"" + MITREidDataService.ACCESSTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":null,\"idTokenId\":null,\"scope\":[\"id-token\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3ODk5NjgsInN1YiI6IjkwMzQyLkFTREZKV0ZBIiwiYXRfaGFzaCI6InptTmt1QmNRSmNYQktNaVpFODZqY0EiLCJhdWQiOlsiY2xpZW50Il0sImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDgwXC9vcGVuaWQtY29ubmVjdC1zZXJ2ZXItd2ViYXBwXC8iLCJpYXQiOjE0MTI3ODkzNjh9.xkEJ9IMXpH7qybWXomfq9WOOlpGYnrvGPgey9UQ4GLzbQx7JC0XgJK83PmrmBZosvFPCmota7FzI_BtwoZLgAZfFiH6w3WIlxuogoH-TxmYbxEpTHoTsszZppkq9mNgOlArV4jrR9y3TPo4MovsH71dDhS_ck-CvAlJunHlqhs0\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
+ "\"refreshTokenId\":1,\"idTokenId\":1,\"scope\":[\"openid\",\"offline_access\",\"email\",\"profile\"],\"type\":\"Bearer\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MTI3OTI5NjgsImF1ZCI6WyJjbGllbnQiXSwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0OjgwODBcL29wZW5pZC1jb25uZWN0LXNlcnZlci13ZWJhcHBcLyIsImp0aSI6IjBmZGE5ZmRiLTYyYzItNGIzZS05OTdiLWU0M2VhMDUwMzNiOSIsImlhdCI6MTQxMjc4OTM2OH0.xgaVpRLYE5MzbgXfE0tZt823tjAm6Oh3_kdR1P2I9jRLR6gnTlBQFlYi3Y_0pWNnZSerbAE8Tn6SJHZ9k-curVG0-ByKichV7CNvgsE5X_2wpEaUzejvKf8eZ-BammRY-ie6yxSkAarcUGMvGGOLbkFcz5CtrBpZhfd75J49BIQ\"}" +
|
||||||
|
|
||||||
|
@ -1128,8 +1132,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExportGrants() throws IOException, ParseException {
|
public void testExportGrants() throws IOException, ParseException {
|
||||||
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090Z", Locale.ENGLISH);
|
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
||||||
when(mockToken1.getId()).thenReturn(1L);
|
when(mockToken1.getId()).thenReturn(1L);
|
||||||
|
@ -1143,9 +1148,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
||||||
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
||||||
|
|
||||||
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090Z", Locale.ENGLISH);
|
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090Z", Locale.ENGLISH);
|
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090Z", Locale.ENGLISH);
|
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ApprovedSite site2 = new ApprovedSite();
|
ApprovedSite site2 = new ApprovedSite();
|
||||||
site2.setId(2L);
|
site2.setId(2L);
|
||||||
|
@ -1243,8 +1248,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportGrants() throws IOException, ParseException {
|
public void testImportGrants() throws IOException, ParseException {
|
||||||
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090Z", Locale.ENGLISH);
|
|
||||||
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090Z", Locale.ENGLISH);
|
Date creationDate1 = formatter.parse("2014-09-10T22:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
Date accessDate1 = formatter.parse("2014-09-10T23:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
OAuth2AccessTokenEntity mockToken1 = mock(OAuth2AccessTokenEntity.class);
|
||||||
when(mockToken1.getId()).thenReturn(1L);
|
when(mockToken1.getId()).thenReturn(1L);
|
||||||
|
@ -1258,9 +1264,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
site1.setAllowedScopes(ImmutableSet.of("openid", "phone"));
|
||||||
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
when(mockToken1.getApprovedSite()).thenReturn(site1);
|
||||||
|
|
||||||
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090Z", Locale.ENGLISH);
|
Date creationDate2 = formatter.parse("2014-09-11T18:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090Z", Locale.ENGLISH);
|
Date accessDate2 = formatter.parse("2014-09-11T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090Z", Locale.ENGLISH);
|
Date timeoutDate2 = formatter.parse("2014-10-01T20:49:44.090+00:00", Locale.ENGLISH);
|
||||||
|
|
||||||
ApprovedSite site2 = new ApprovedSite();
|
ApprovedSite site2 = new ApprovedSite();
|
||||||
site2.setId(2L);
|
site2.setId(2L);
|
||||||
|
@ -1281,11 +1287,11 @@ public class TestMITREidDataService_1_3 {
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [], " +
|
||||||
"\"" + MITREidDataService.GRANTS + "\": [" +
|
"\"" + MITREidDataService.GRANTS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090Z\",\"accessDate\":\"2014-09-10T23:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"foo\",\"creationDate\":\"2014-09-10T22:49:44.090+00:00\",\"accessDate\":\"2014-09-10T23:49:44.090+00:00\","
|
||||||
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
+ "\"userId\":\"user1\",\"whitelistedSiteId\":null,\"allowedScopes\":[\"openid\",\"phone\"], \"whitelistedSiteId\":1,"
|
||||||
+ "\"approvedAccessTokens\":[1]}," +
|
+ "\"approvedAccessTokens\":[1]}," +
|
||||||
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090Z\",\"accessDate\":\"2014-09-11T20:49:44.090Z\","
|
"{\"id\":2,\"clientId\":\"bar\",\"creationDate\":\"2014-09-11T18:49:44.090+00:00\",\"accessDate\":\"2014-09-11T20:49:44.090+00:00\","
|
||||||
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090Z\",\"userId\":\"user2\","
|
+ "\"timeoutDate\":\"2014-10-01T20:49:44.090+00:00\",\"userId\":\"user2\","
|
||||||
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
+ "\"allowedScopes\":[\"openid\",\"offline_access\",\"email\",\"profile\"]}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
@ -1714,7 +1720,8 @@ public class TestMITREidDataService_1_3 {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
public void testFixRefreshTokenAuthHolderReferencesOnImport() throws IOException, ParseException {
|
||||||
String expiration1 = "2014-09-10T22:49:44.090Z";
|
|
||||||
|
String expiration1 = "2014-09-10T22:49:44.090+00:00";
|
||||||
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
Date expirationDate1 = formatter.parse(expiration1, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient1 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -1737,7 +1744,7 @@ public class TestMITREidDataService_1_3 {
|
||||||
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
token1.setJwt(JWTParser.parse("eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ."));
|
||||||
token1.setAuthenticationHolder(holder1);
|
token1.setAuthenticationHolder(holder1);
|
||||||
|
|
||||||
String expiration2 = "2015-01-07T18:31:50.079Z";
|
String expiration2 = "2015-01-07T18:31:50.079+00:00";
|
||||||
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
Date expirationDate2 = formatter.parse(expiration2, Locale.ENGLISH);
|
||||||
|
|
||||||
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
ClientDetailsEntity mockedClient2 = mock(ClientDetailsEntity.class);
|
||||||
|
@ -1776,9 +1783,9 @@ public class TestMITREidDataService_1_3 {
|
||||||
" ]," +
|
" ]," +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090Z\","
|
"{\"id\":1,\"clientId\":\"mocked_client_1\",\"expiration\":\"2014-09-10T22:49:44.090+00:00\","
|
||||||
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
+ "\"authenticationHolderId\":1,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJmOTg4OWQyOS0xMTk1LTQ4ODEtODgwZC1lZjVlYzAwY2Y4NDIifQ.\"}," +
|
||||||
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079Z\","
|
"{\"id\":2,\"clientId\":\"mocked_client_2\",\"expiration\":\"2015-01-07T18:31:50.079+00:00\","
|
||||||
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
+ "\"authenticationHolderId\":2,\"value\":\"eyJhbGciOiJub25lIn0.eyJqdGkiOiJlYmEyYjc3My0xNjAzLTRmNDAtOWQ3MS1hMGIxZDg1OWE2MDAifQ.\"}" +
|
||||||
|
|
||||||
" ]" +
|
" ]" +
|
||||||
|
|
45
pom.xml
45
pom.xml
|
@ -67,7 +67,7 @@
|
||||||
</mailingLists>
|
</mailingLists>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java-version>1.8</java-version>
|
<java-version>11</java-version>
|
||||||
<org.slf4j-version>1.7.25</org.slf4j-version>
|
<org.slf4j-version>1.7.25</org.slf4j-version>
|
||||||
</properties>
|
</properties>
|
||||||
<description>A reference implementation of OpenID Connect (http://openid.net/connect/), OAuth 2.0, and UMA built on top of Java, Spring, and Spring Security. The project contains a fully functioning server, client, and utility library.</description>
|
<description>A reference implementation of OpenID Connect (http://openid.net/connect/), OAuth 2.0, and UMA built on top of Java, Spring, and Spring Security. The project contains a fully functioning server, client, and utility library.</description>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.7.9</version>
|
<version>0.8.7</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-maven-plugin</artifactId>
|
<artifactId>wro4j-maven-plugin</artifactId>
|
||||||
<version>1.8.0</version>
|
<version>1.10.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-extensions</artifactId>
|
<artifactId>wro4j-extensions</artifactId>
|
||||||
<version>1.8.0</version>
|
<version>1.10.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -460,12 +460,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.persistence</groupId>
|
<groupId>org.eclipse.persistence</groupId>
|
||||||
<artifactId>org.eclipse.persistence.jpa</artifactId>
|
<artifactId>org.eclipse.persistence.jpa</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>2.7.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.persistence</groupId>
|
<groupId>org.eclipse.persistence</groupId>
|
||||||
<artifactId>javax.persistence</artifactId>
|
<artifactId>javax.persistence</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>2.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zaxxer</groupId>
|
<groupId>com.zaxxer</groupId>
|
||||||
|
@ -585,7 +585,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>21.0</version>
|
<version>27.0-jre</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.persistence</groupId>
|
<groupId>org.eclipse.persistence</groupId>
|
||||||
<artifactId>org.eclipse.persistence.core</artifactId>
|
<artifactId>org.eclipse.persistence.core</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>2.7.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
@ -626,7 +626,34 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ro.isdc.wro4j</groupId>
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
<artifactId>wro4j-extensions</artifactId>
|
<artifactId>wro4j-extensions</artifactId>
|
||||||
<version>1.8.0</version>
|
<version>1.10.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- java11 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.activation</groupId>
|
||||||
|
<artifactId>activation</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
<version>2.3.0-b170127.1453</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mitre</groupId>
|
<groupId>org.mitre</groupId>
|
||||||
<artifactId>openid-connect-parent</artifactId>
|
<artifactId>openid-connect-parent</artifactId>
|
||||||
<version>1.3.3-SNAPSHOT</version>
|
<version>1.3.5-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>uma-server-webapp</artifactId>
|
<artifactId>uma-server-webapp</artifactId>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mitre</groupId>
|
<groupId>org.mitre</groupId>
|
||||||
<artifactId>openid-connect-parent</artifactId>
|
<artifactId>openid-connect-parent</artifactId>
|
||||||
<version>1.3.3-SNAPSHOT</version>
|
<version>1.3.5-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>uma-server</artifactId>
|
<artifactId>uma-server</artifactId>
|
||||||
|
@ -47,4 +47,4 @@
|
||||||
<artifactId>openid-connect-client</artifactId>
|
<artifactId>openid-connect-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue