Skip to content

Commit

Permalink
Merge pull request #171 from thanujalk/master
Browse files Browse the repository at this point in the history
Fixing SAML test case.
  • Loading branch information
johannnallathamby committed Aug 7, 2015
2 parents 7988968 + 97b6fe4 commit 04a9d74
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public SAMLSSOServiceClient(String backEndUrl, String userName, String password)

}

public int getSSOSessionTimeout()
throws Exception {
try {
return identitySAMLSSOServiceStub.getSSOSessionTimeout();
} catch (RemoteException e) {
throw new RemoteException("Error while getting SSO Session timeout ", e);
}
}
// public int getSSOSessionTimeout()
// throws Exception {
// try {
// return identitySAMLSSOServiceStub.getSSOSessionTimeout();
// } catch (RemoteException e) {
// throw new RemoteException("Error while getting SSO Session timeout ", e);
// }
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ private SAMLSSOServiceProviderDTO getSAMLSSOServiceProviderDTO(String issuerName

SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
samlssoServiceProviderDTO.setIssuer(issuerName);
samlssoServiceProviderDTO.setAssertionConsumerUrl(acsUrl);
samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[]{acsUrl});
samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(acsUrl);
samlssoServiceProviderDTO.setNameIDFormat(SAML_NAME_ID_FORMAT);
samlssoServiceProviderDTO.setDoSignAssertions(true);
samlssoServiceProviderDTO.setDoSignResponse(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@ private void deleteUser(){
private SAMLSSOServiceProviderDTO createSsoServiceProviderDTO() {
SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
samlssoServiceProviderDTO.setIssuer(config.getApp().getArtifact());
samlssoServiceProviderDTO.setAssertionConsumerUrl(String.format(ACS_URL, config.getApp().getArtifact()));
samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] {String.format(ACS_URL,
config.getApp().getArtifact())});
samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(ACS_URL, config.getApp().getArtifact()));
samlssoServiceProviderDTO.setAttributeConsumingServiceIndex(ATTRIBUTE_CS_INDEX_VALUE);
samlssoServiceProviderDTO.setNameIDFormat(NAMEID_FORMAT);
samlssoServiceProviderDTO.setDoSignAssertions(config.getApp().isSigningEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public void testInit() throws Exception {
super.init();
}

@Test(groups = "wso2.is", description = "Get SSO session timeout")
public void testSSOSessionTimeout()
throws Exception {
SAMLSSOServiceClient ssoServiceClient =
new SAMLSSOServiceClient(backendURL, sessionCookie);
int ssoTimeoutVal = ssoServiceClient.getSSOSessionTimeout();
Assert.assertEquals(ssoTimeoutVal,"120");
}
// @Test(groups = "wso2.is", description = "Get SSO session timeout")
// public void testSSOSessionTimeout()
// throws Exception {
// SAMLSSOServiceClient ssoServiceClient =
// new SAMLSSOServiceClient(backendURL, sessionCookie);
// int ssoTimeoutVal = ssoServiceClient.getSSOSessionTimeout();
// Assert.assertEquals(ssoTimeoutVal,"120");
// }

/**
* Replace identity.xml file with the original one in the IS pack.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ private SAMLSSOServiceProviderDTO getSAMLSSOServiceProviderDTO(String issuerName

SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
samlssoServiceProviderDTO.setIssuer(issuerName);
samlssoServiceProviderDTO.setAssertionConsumerUrl(acsUrl);
samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[]{acsUrl});
samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(acsUrl);
samlssoServiceProviderDTO.setNameIDFormat(SAML_NAME_ID_FORMAT);
samlssoServiceProviderDTO.setDoSignAssertions(true);
samlssoServiceProviderDTO.setDoSignResponse(true);
Expand Down

0 comments on commit 04a9d74

Please sign in to comment.