git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-client@134800 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e0972c8291
commit
b4c40c4507
|
@ -3,6 +3,9 @@
|
||||||
<Change>First Release</Change>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="authorization-client-2.0.0" date="2016-09-30">
|
<Changeset component="authorization-client-2.0.0" date="2016-09-30">
|
||||||
<Change>moving to auth2</Change>
|
<Change>moving to auth2 service</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="authorization-client-2.0.1" date="2016-11-25">
|
||||||
|
<Change>added calls for ExternalServiceToken generator</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
</ReleaseNotes>
|
</ReleaseNotes>
|
|
@ -38,6 +38,18 @@ public class CallTest {
|
||||||
System.out.println(authorizationService().resolveTokenByUserAndContext("alessandro.pieve", "/gcube/devsec"));
|
System.out.println(authorizationService().resolveTokenByUserAndContext("alessandro.pieve", "/gcube/devsec"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void requestExternalServiceToken() throws Exception {
|
||||||
|
SecurityTokenProvider.instance.set(requestTestToken("/gcube/devsec"));
|
||||||
|
System.out.println(authorizationService().generateExternalServiceToken("OBISTest"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getExternalServiceToken() throws Exception {
|
||||||
|
SecurityTokenProvider.instance.set(requestTestToken("/gcube/devsec"));
|
||||||
|
System.out.println(authorizationService().retrieveExternalServiceGenerated());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void requestNodeToken() throws Exception {
|
public void requestNodeToken() throws Exception {
|
||||||
System.out.println(_requestNodeToken());
|
System.out.println(_requestNodeToken());
|
||||||
|
@ -66,7 +78,7 @@ public class CallTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void generateToken() throws Exception{
|
public void generateToken() throws Exception{
|
||||||
System.out.println(authorizationService().generateUserToken(new UserInfo("alessandro.pieve", new ArrayList<String>()), "/gcube/devsec"));
|
System.out.println(authorizationService().generateUserToken(new UserInfo("alessandro.pieve", new ArrayList<String>()), "/gcube/devNext"));
|
||||||
}
|
}
|
||||||
@Test(expected=RuntimeException.class)
|
@Test(expected=RuntimeException.class)
|
||||||
public void createKeyWithError() throws Exception {
|
public void createKeyWithError() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue