Commit d0dbc1bd authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '17-oauth-tokens-with-hsql' into 'master'

Resolve "OAuth tokens with HSQL"

Closes #17

See merge request !16
parents 8b91b0a6 1df778d1
......@@ -29,7 +29,6 @@ publish artifacts on central:
- echo "${GPG_KEY_SECRET}" | gpg --batch --import
- gpg --list-keys
script:
- echo "Using username ${GLIS_USERNAME} for authentication against https://glistest.planttreaty.org"
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn -P release clean deploy --settings .ci-maven-settings.xml -B -U
only:
- /^application\-blocks\-/
......@@ -26,6 +26,8 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Type;
/**
* OAuth AccessToken
*/
......@@ -47,7 +49,8 @@ public class AccessToken implements Serializable {
/** The token. */
@Lob
private byte[] token;
@Type(type = "org.hibernate.type.MaterializedBlobType")
private byte[] token;
/** The username. */
@Column(length = 100)
......@@ -59,6 +62,7 @@ public class AccessToken implements Serializable {
/** The authentication. */
@Lob
@Type(type = "org.hibernate.type.MaterializedBlobType")
private byte[] authentication;
/** The refresh token. */
......
......@@ -26,6 +26,8 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Type;
/**
* OAuth RefreshToken
*/
......@@ -43,11 +45,13 @@ public class RefreshToken implements Serializable {
/** The token. */
@Lob
private byte[] token;
@Type(type = "org.hibernate.type.MaterializedBlobType")
private byte[] token;
/** The authentication. */
@Lob
private byte[] authentication;
@Type(type = "org.hibernate.type.MaterializedBlobType")
private byte[] authentication;
/** The client id. */
@Column(length = 100, updatable = false)
......
......@@ -68,7 +68,7 @@ public class OAuth2GrantTypeTest extends AbstractRestTest {
}
@Test
public void getAccessTokenWithClientCredentialsGrandTest() throws Exception {
public void getAccessTokenWithClientCredentialsGrantTest() throws Exception {
OAuthClient client = makeDefault();
client = oAuthClientRepository.save(client);
assertThat("OAuthClient#id must be generated", client.getId(), not(nullValue()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment