|
|
@ -45,6 +45,10 @@ import javax.persistence.Temporal; |
|
|
|
import javax.persistence.Transient; |
|
|
|
import javax.persistence.Transient; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.security.oauth2.common.OAuth2AccessToken; |
|
|
|
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 org.springframework.security.oauth2.common.OAuth2RefreshToken; |
|
|
|
|
|
|
|
|
|
|
|
import com.nimbusds.jwt.JWT; |
|
|
|
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.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") |
|
|
|
@NamedQuery(name = "OAuth2AccessTokenEntity.getByTokenValue", query = "select a from OAuth2AccessTokenEntity a where a.value = :tokenValue") |
|
|
|
}) |
|
|
|
}) |
|
|
|
//@JsonSerialize(using = OAuth2AccessTokenSerializer.class)
|
|
|
|
@org.codehaus.jackson.map.annotate.JsonSerialize(using = OAuth2AccessTokenJackson1Serializer.class) |
|
|
|
//@JsonDeserialize(using = OAuth2AccessTokenDeserializer.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 class OAuth2AccessTokenEntity implements OAuth2AccessToken { |
|
|
|
|
|
|
|
|
|
|
|
public static String ID_TOKEN_FIELD_NAME = "id_token"; |
|
|
|
public static String ID_TOKEN_FIELD_NAME = "id_token"; |
|
|
|