Skip to content

Commit 762b0b9

Browse files
committed
Change parameter's names for GAM compatibility
1 parent 24197d4 commit 762b0b9

File tree

2 files changed

+32
-22
lines changed

2 files changed

+32
-22
lines changed

gamsaml20/src/main/java/com/genexus/saml20/RedirectBinding.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public void init(String queryString) {
4545

4646

4747
public static String login(SamlParms parms, String relayState) {
48-
Document request = SamlAssertionUtils.createLoginRequest(parms.getId(), parms.getDestination(), parms.getAcs(), parms.getIssuer(), parms.getPolicyFormat(), parms.getAuthnContext(), parms.getSPName(), parms.getForceAuthn());
49-
return generateQuery(request, parms.getDestination(), parms.getCertPath(), parms.getCertPass(), parms.getCertAlias(), relayState);
48+
Document request = SamlAssertionUtils.createLoginRequest(parms.getId(), parms.getEndPointLocation(), parms.getAcs(), parms.getIdentityProviderEntityID(), parms.getPolicyFormat(), parms.getAuthnContext(), parms.getServiceProviderEntityID(), parms.getForceAuthn());
49+
return generateQuery(request, parms.getEndPointLocation(), parms.getCertPath(), parms.getCertPass(), parms.getCertAlias(), relayState);
5050
}
5151

5252
public static String logout(SamlParms parms, String relayState) {
53-
Document request = SamlAssertionUtils.createLogoutRequest(parms.getId(), parms.getIssuer(), parms.getNameID(), parms.getSessionIndex(), parms.getDestination());
54-
return generateQuery(request, parms.getDestination(), parms.getCertPath(), parms.getCertPass(), parms.getCertAlias(), relayState);
53+
Document request = SamlAssertionUtils.createLogoutRequest(parms.getId(), parms.getServiceProviderEntityID(), parms.getNameID(), parms.getSessionIndex(), parms.getSingleLogoutEndpoint());
54+
return generateQuery(request, parms.getSingleLogoutEndpoint(), parms.getCertPath(), parms.getCertPass(), parms.getCertAlias(), relayState);
5555
}
5656

5757
public boolean verifySignatures(SamlParms parms) {

gamsaml20/src/main/java/com/genexus/saml20/SamlParms.java

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
public class SamlParms {
55

66
private String id;
7-
private String destination;
7+
private String endPointLocation; //IdP Login URL
8+
private String singleLogoutEndpoint; //IdP Logout URL
89
private String acs;
9-
private String issuer;
10+
private String identityProviderEntityID; //issuer
1011
private String certPath;
1112
private String certPass;
1213
private String certAlias;
1314
private String policyFormat;
1415
private String authnContext;
15-
private String spName;
16+
private String serviceProviderEntityID; //spName
1617
private boolean forceAuthn;
1718
private String nameID;
1819
private String sessionIndex;
@@ -23,15 +24,16 @@ public class SamlParms {
2324

2425
public SamlParms() {
2526
id = "";
26-
destination = "";
27+
endPointLocation = "";
28+
singleLogoutEndpoint = "";
2729
acs = "";
28-
issuer = "";
30+
identityProviderEntityID = "";
2931
certPath = "";
3032
certPass = "";
3133
certAlias = "";
3234
policyFormat = "";
3335
authnContext = "";
34-
spName = "";
36+
serviceProviderEntityID = "";
3537
forceAuthn = false;
3638
nameID = "";
3739
sessionIndex = "";
@@ -48,12 +50,20 @@ public String getId() {
4850
return id;
4951
}
5052

51-
public void setDestination(String value) {
52-
destination = value;
53+
public void setEndPointLocation(String value) {
54+
endPointLocation = value;
5355
}
5456

55-
public String getDestination() {
56-
return destination;
57+
public String getEndPointLocation() {
58+
return endPointLocation;
59+
}
60+
61+
public void setSingleLogoutEndpoint(String value) {
62+
singleLogoutEndpoint = value;
63+
}
64+
65+
public String getSingleLogoutEndpoint() {
66+
return singleLogoutEndpoint;
5767
}
5868

5969
public void setAcs(String value) {
@@ -64,12 +74,12 @@ public String getAcs() {
6474
return acs;
6575
}
6676

67-
public void setIssuer(String value) {
68-
issuer = value;
77+
public void setIdentityProviderEntityID(String value) {
78+
identityProviderEntityID = value;
6979
}
7080

71-
public String getIssuer() {
72-
return issuer;
81+
public String getIdentityProviderEntityID() {
82+
return identityProviderEntityID;
7383
}
7484

7585
public void setCertPath(String value) {
@@ -112,12 +122,12 @@ public String getAuthnContext() {
112122
return authnContext;
113123
}
114124

115-
public void setSPName(String value) {
116-
spName = value;
125+
public void setServiceProviderEntityID(String value) {
126+
serviceProviderEntityID = value;
117127
}
118128

119-
public String getSPName() {
120-
return spName;
129+
public String getServiceProviderEntityID() {
130+
return serviceProviderEntityID;
121131
}
122132

123133
public void setForceAuthn(boolean value) {

0 commit comments

Comments
 (0)