Skip to content

Commit

Permalink
merged jwt token in the server module. issue #2229
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Nov 26, 2014
1 parent 8c844a7 commit 29f0cc4
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 103 deletions.
1 change: 0 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<fileset dir="distributed" includes="build.xml"/>
<fileset dir="tools" includes="build.xml"/>
<fileset dir="graphdb" includes="build.xml"/>
<fileset dir="token-auth-jwt" includes="build.xml"/>
<fileset dir="tests" includes="build.xml"/>
</subant>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
package com.orientechnologies.orient.server.jwt.impl;

import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

import com.orientechnologies.orient.core.Orient;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.id.ORecordId;
import com.orientechnologies.orient.core.metadata.security.OSecurityUser;
Expand All @@ -19,13 +22,19 @@
import com.orientechnologies.orient.core.metadata.security.jwt.OJwtHeader;
import com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload;
import com.orientechnologies.orient.server.config.OServerParameterConfiguration;
import com.orientechnologies.orient.server.jwt.impl.JwtTokenHandler;

public class JwtTokenHandlerTest {

private static final OServerParameterConfiguration[] I_PARAMS = new OServerParameterConfiguration[] { new OServerParameterConfiguration(
JwtTokenHandler.O_SIGN_KEY, "crappy key") };

@BeforeMethod
public void beforeTest() {
if (Orient.instance().getEngine("memory") == null) {
Orient.instance().startup();
}
}

@Test
public void testWebTokenCreationValidation() throws InvalidKeyException, NoSuchAlgorithmException, IOException {
ODatabaseDocumentTx db = new ODatabaseDocumentTx("memory:" + JwtTokenHandlerTest.class.getSimpleName());
Expand Down
6 changes: 0 additions & 6 deletions token-auth-jwt/build.xml

This file was deleted.

93 changes: 0 additions & 93 deletions token-auth-jwt/pom.xml

This file was deleted.

Empty file.

0 comments on commit 29f0cc4

Please sign in to comment.