explicitly added Jackson2 to support secoauth serialization, added string converter to work with our API
parent
e6d10b67a4
commit
b50facd4c2
|
@ -87,6 +87,16 @@
|
|||
</dependency>
|
||||
<!-- /Logging -->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.3.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.3.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
|
|
@ -45,6 +45,10 @@ import javax.persistence.Temporal;
|
|||
import javax.persistence.Transient;
|
||||
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessTokenJackson1Deserializer;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessTokenJackson1Serializer;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessTokenJackson2Deserializer;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessTokenJackson2Serializer;
|
||||
import org.springframework.security.oauth2.common.OAuth2RefreshToken;
|
||||
|
||||
import com.nimbusds.jwt.JWT;
|
||||
|
@ -65,8 +69,10 @@ import com.nimbusds.jwt.JWTParser;
|
|||
@NamedQuery(name = "OAuth2AccessTokenEntity.getByIdToken", query = "select a from OAuth2AccessTokenEntity a where a.idToken = :idToken"),
|
||||
@NamedQuery(name = "OAuth2AccessTokenEntity.getByTokenValue", query = "select a from OAuth2AccessTokenEntity a where a.value = :tokenValue")
|
||||
})
|
||||
//@JsonSerialize(using = OAuth2AccessTokenSerializer.class)
|
||||
//@JsonDeserialize(using = OAuth2AccessTokenDeserializer.class)
|
||||
@org.codehaus.jackson.map.annotate.JsonSerialize(using = OAuth2AccessTokenJackson1Serializer.class)
|
||||
@org.codehaus.jackson.map.annotate.JsonDeserialize(using = OAuth2AccessTokenJackson1Deserializer.class)
|
||||
@com.fasterxml.jackson.databind.annotation.JsonSerialize(using = OAuth2AccessTokenJackson2Serializer.class)
|
||||
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = OAuth2AccessTokenJackson2Deserializer.class)
|
||||
public class OAuth2AccessTokenEntity implements OAuth2AccessToken {
|
||||
|
||||
public static String ID_TOKEN_FIELD_NAME = "id_token";
|
||||
|
|
|
@ -34,7 +34,13 @@
|
|||
|
||||
<!-- Enables the Spring MVC @Controller programming model -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager" />
|
||||
<mvc:annotation-driven ignore-default-model-on-redirect="true" />
|
||||
<mvc:annotation-driven ignore-default-model-on-redirect="true">
|
||||
<mvc:message-converters>
|
||||
<bean class="org.springframework.http.converter.StringHttpMessageConverter" />
|
||||
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
|
||||
</mvc:message-converters>
|
||||
</mvc:annotation-driven>
|
||||
|
||||
<mvc:interceptors>
|
||||
<!-- Inject the UserInfo into the current context -->
|
||||
<bean id="userInfoInterceptor" class="org.mitre.openid.connect.web.UserInfoInterceptor" />
|
||||
|
|
Loading…
Reference in New Issue