Commit 1b19d087 authored by Misagh Moayyed's avatar Misagh Moayyed
Browse files

Refactored service responses into individual components

parent 34ad07dd
...@@ -22,7 +22,6 @@ package org.jasig.cas.support.saml.authentication.principal; ...@@ -22,7 +22,6 @@ package org.jasig.cas.support.saml.authentication.principal;
import org.jasig.cas.authentication.principal.AbstractWebApplicationService; import org.jasig.cas.authentication.principal.AbstractWebApplicationService;
import org.jasig.cas.authentication.principal.ResponseBuilder; import org.jasig.cas.authentication.principal.ResponseBuilder;
import org.jasig.cas.authentication.principal.WebApplicationService; import org.jasig.cas.authentication.principal.WebApplicationService;
import org.jasig.cas.support.saml.util.GoogleSaml20ObjectBuilder;
/** /**
* Implementation of a Service that supports Google Accounts (eventually a more * Implementation of a Service that supports Google Accounts (eventually a more
* generic SAML2 support will come). * generic SAML2 support will come).
...@@ -34,8 +33,6 @@ public class GoogleAccountsService extends AbstractWebApplicationService { ...@@ -34,8 +33,6 @@ public class GoogleAccountsService extends AbstractWebApplicationService {
private static final long serialVersionUID = 6678711809842282833L; private static final long serialVersionUID = 6678711809842282833L;
private static final GoogleSaml20ObjectBuilder BUILDER = new GoogleSaml20ObjectBuilder();
private final String relayState; private final String relayState;
private final String requestId; private final String requestId;
...@@ -50,24 +47,7 @@ public class GoogleAccountsService extends AbstractWebApplicationService { ...@@ -50,24 +47,7 @@ public class GoogleAccountsService extends AbstractWebApplicationService {
*/ */
protected GoogleAccountsService(final String id, final String relayState, final String requestId, protected GoogleAccountsService(final String id, final String relayState, final String requestId,
final ResponseBuilder<WebApplicationService> responseBuilder) { final ResponseBuilder<WebApplicationService> responseBuilder) {
this(id, id, null, relayState, requestId, responseBuilder); super(id, id, null, responseBuilder);
}
/**
* Instantiates a new google accounts service.
*
* @param id the id
* @param originalUrl the original url
* @param artifactId the artifact id
* @param relayState the relay state
* @param requestId the request id
* @param responseBuilder the response builder
*/
protected GoogleAccountsService(final String id, final String originalUrl,
final String artifactId, final String relayState,
final String requestId,
final ResponseBuilder<WebApplicationService> responseBuilder) {
super(id, originalUrl, artifactId, responseBuilder);
this.relayState = relayState; this.relayState = relayState;
this.requestId = requestId; this.requestId = requestId;
} }
...@@ -82,6 +62,7 @@ public class GoogleAccountsService extends AbstractWebApplicationService { ...@@ -82,6 +62,7 @@ public class GoogleAccountsService extends AbstractWebApplicationService {
return true; return true;
} }
public String getRelayState() { public String getRelayState() {
return relayState; return relayState;
} }
......
...@@ -21,8 +21,6 @@ package org.jasig.cas.support.saml.authentication.principal; ...@@ -21,8 +21,6 @@ package org.jasig.cas.support.saml.authentication.principal;
import org.jasig.cas.authentication.principal.AbstractWebApplicationService; import org.jasig.cas.authentication.principal.AbstractWebApplicationService;
import org.jasig.cas.authentication.principal.ResponseBuilder; import org.jasig.cas.authentication.principal.ResponseBuilder;
import org.jasig.cas.authentication.principal.WebApplicationService; import org.jasig.cas.authentication.principal.WebApplicationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Class to represent that this service wants to use SAML. We use this in * Class to represent that this service wants to use SAML. We use this in
...@@ -34,23 +32,13 @@ import org.slf4j.LoggerFactory; ...@@ -34,23 +32,13 @@ import org.slf4j.LoggerFactory;
*/ */
public final class SamlService extends AbstractWebApplicationService { public final class SamlService extends AbstractWebApplicationService {
private static final Logger LOGGER = LoggerFactory.getLogger(SamlService.class);
/** /**
* Unique Id for serialization. * Unique Id for serialization.
*/ */
private static final long serialVersionUID = -6867572626767140223L; private static final long serialVersionUID = -6867572626767140223L;
private String requestId; private final String requestId;
/**
* Instantiates a new SAML service.
*
* @param id the service id
*/
protected SamlService(final String id) {
super(id, id, null, null);
}
/** /**
* Instantiates a new SAML service. * Instantiates a new SAML service.
......
Supports Markdown
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