Skip to content

Commit

Permalink
Merge branch 'master' into findbugs-fixes
Browse files Browse the repository at this point in the history
Conflicts:
	cas-server-core/src/main/java/org/jasig/cas/authentication/principal/AbstractWebApplicationService.java
	cas-server-core/src/main/java/org/jasig/cas/authentication/principal/RememberMeAuthenticationMetaDataPopulator.java
	cas-server-core/src/main/java/org/jasig/cas/authentication/principal/ShibbolethCompatiblePersistentIdGenerator.java
	cas-server-core/src/main/java/org/jasig/cas/util/ApplicationContextProvider.java
	cas-server-extension-clearpass/src/main/java/org/jasig/cas/extension/clearpass/EncryptedMapDecorator.java
	cas-server-support-openid/src/main/java/org/jasig/cas/support/openid/web/mvc/SmartOpenIdController.java
	cas-server-support-saml/src/main/java/org/jasig/cas/support/saml/authentication/principal/GoogleAccountsService.java
	cas-server-support-saml/src/main/java/org/jasig/cas/support/saml/authentication/principal/SamlService.java
	cas-server-support-x509/src/main/java/org/jasig/cas/adaptors/x509/authentication/handler/support/RevokedCertificateException.java
	cas-server-webapp-support/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java
  • Loading branch information
SavvasMisaghMoayyed committed Nov 27, 2014
2 parents 242da51 + af78612 commit c2bb943
Show file tree
Hide file tree
Showing 387 changed files with 1,904 additions and 1,449 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
*/
package org.jasig.cas.services.web;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;

import org.jasig.cas.services.RegexRegisteredService;
import org.jasig.cas.services.RegisteredService;
import org.jasig.cas.services.RegisteredServiceImpl;
Expand All @@ -49,6 +41,13 @@
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
* SimpleFormController to handle adding/editing of RegisteredServices.
*
Expand Down Expand Up @@ -111,10 +110,10 @@ public RegisteredServiceSimpleFormController(final ServicesManager servicesManag
*/
@InitBinder
protected void initBinder(final HttpServletRequest request, final ServletRequestDataBinder binder) throws Exception {
binder.setRequiredFields(new String[] {"description", "serviceId",
binder.setRequiredFields("description", "serviceId",
"name", "enabled", "ssoEnabled",
"anonymousAccess", "evaluationOrder"});
binder.setDisallowedFields(new String[] {"id"});
"anonymousAccess", "evaluationOrder");
binder.setDisallowedFields("id");
binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ public final class RegisteredServiceValidator implements Validator {
/** Default length, which matches what is in the view. */
private static final int DEFAULT_MAX_DESCRIPTION_LENGTH = 300;

/** {@link ServicesManager} to look up services. */
/**
* {@link ServicesManager} to look up services.
**/
@NotNull
private final ServicesManager servicesManager;

/** The maximum length of the description we will accept. */
@Min(0)
private int maxDescriptionLength = DEFAULT_MAX_DESCRIPTION_LENGTH;

/** {@link IPersonAttributeDao} to manage person attributes. */
/**
* {@link IPersonAttributeDao} to manage person attributes.
**/
@NotNull
private final IPersonAttributeDao personAttributeDao;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
*/
package org.jasig.cas.web.view;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.json.exception.JsonExceptionResolver;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* Implementation of JsonExceptionResolver that only triages the exception occurred
* for JSON requests.
*
* @author Misagh Moayyed
* @since 4.0.0
*/
* Implementation of JsonExceptionResolver that only triages the exception occurred
* for JSON requests.
*
* @author Misagh Moayyed
* @since 4.0.0
*/
public class AjaxAwareJsonExceptionResolver extends JsonExceptionResolver {

private final Logger logger = LoggerFactory.getLogger(this.getClass());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ management.services.manage.label.evaluationOrder=Ordre
management.services.manage.action.edit=éditer
management.services.manage.action.delete=supprimer

management.services.add.property.ignoreAttributes=Ignorer la gestion des attributs par cet outil
management.services.add.property.evaluationOrder=Ordre



screen.unavailable.heading=L'application d'administration de CAS est indisponible
screen.unavailable.message=Une erreur s'est produite. Merci de contacter votre support ou de réessayer.
footer.links=Liens vers les ressources CAS :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* Common test cases for /serviceValidate and /proxyValidate.
* @since 3.0
* @since 3.0.0
*/
public abstract class AbstractCas2ValidateCompatibilityTests extends AbstractCompatibilityTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @author Scott Battaglia
* @author Drew Mazurek
* @since 3.0
* @since 3.0.0
*
*/
public class LoginAsCredentialsAcceptorCompatibilityTests extends AbstractLoginCompatibilityTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @author Scott Battaglia
* @author Drew Mazurek
* @since 3.0
* @since 3.0.0
*
*/
public class LoginAsCredentialsRequestorCompatibilityTests extends AbstractLoginCompatibilityTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Helper class for accomplishing CAS login, a common task of compatibility tests.
*
* @since 3.0
* @since 3.0.0
*/
public final class LoginHelper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
*
* @author Scott Battaglia
* @since 3.0
* @since 3.0.0
*
*/
public class LogoutCompatibilityTests extends AbstractCompatibilityTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Note that this extends Cas2ValidateCompatibilityTests, which provides
* several tests that apply to both service validate and proxy validate.
*
* @since 3.0
* @since 3.0.0
*/
public class ProxyValidateCompatibilityTests
extends AbstractCas2ValidateCompatibilityTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Note that this extends Cas2ValidateCompatibilityTests, which provides
* several tests that apply to both service validate and proxy validate.
*
* @since 3.0
* @since 3.0.0
*/
public class ServiceValidateCompatibilityTests
extends AbstractCas2ValidateCompatibilityTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Scott Battaglia
* @author Andrew Petro
* @author Drew Mazurek
* @since 3.0
* @since 3.0.0
*/
public class ValidateCompatibilityTests extends AbstractCompatibilityTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* by the protocol.
*
* @author Misagh Moayyed
* @since 4.1
* @since 4.1.0
*/
public interface CasProtocolConstants {

Expand Down
4 changes: 2 additions & 2 deletions cas-server-core/src/main/java/org/jasig/cas/CasVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author Dmitriy Kopylenko
* @since 3.0
* @since 3.0.0
*/
public final class CasVersion {

Expand All @@ -37,8 +37,8 @@ private CasVersion() {
}

/**
* @see java.lang.Package#getImplementationVersion
* @return Return the full CAS version string.
* @see java.lang.Package#getImplementationVersion
*/
public static String getVersion() {
return CasVersion.class.getPackage().getImplementationVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.jasig.cas.authentication.Credential;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.logout.LogoutRequest;
import org.jasig.cas.ticket.TicketException;
import org.jasig.cas.ticket.InvalidTicketException;
import org.jasig.cas.ticket.ServiceTicket;
import org.jasig.cas.ticket.Ticket;
import org.jasig.cas.ticket.TicketException;
import org.jasig.cas.ticket.TicketGrantingTicket;
import org.jasig.cas.validation.Assertion;

Expand All @@ -50,7 +50,7 @@
* @author Scott Battaglia
* @author Marvin S. Addison
* @author Misagh Moayyed
* @since 3.0
* @since 3.0.0
*/
public interface CentralAuthenticationService {

Expand All @@ -65,7 +65,7 @@ public interface CentralAuthenticationService {
* @return Non-null ticket-granting ticket identifier.
*
* @throws AuthenticationException on errors authenticating the credentials
* @throws TicketException if ticket cannot be created
* @throws org.jasig.cas.ticket.TicketException if ticket cannot be created
*/
TicketGrantingTicket createTicketGrantingTicket(Credential... credentials)
throws AuthenticationException, TicketException;
Expand All @@ -83,7 +83,7 @@ TicketGrantingTicket createTicketGrantingTicket(Credential... credentials)
* @param <T> the generic ticket type to return that extends {@link Ticket}
* @return the ticket object
* @throws org.jasig.cas.ticket.InvalidTicketException if ticket is not found or has expired.
* @since 4.1
* @since 4.1.0
*/
<T extends Ticket> T getTicket(String ticketId, Class<? extends Ticket> clazz)
throws InvalidTicketException;
Expand All @@ -98,7 +98,7 @@ <T extends Ticket> T getTicket(String ticketId, Class<? extends Ticket> clazz)
*
* @param predicate the predicate
* @return the tickets
* @since 4.1
* @since 4.1.0
*/
Collection<Ticket> getTickets(Predicate predicate);

Expand All @@ -110,7 +110,7 @@ <T extends Ticket> T getTicket(String ticketId, Class<? extends Ticket> clazz)
*
* @return Non-null service ticket identifier.
*
* @throws TicketException if the ticket could not be created.
* @throws org.jasig.cas.ticket.TicketException if the ticket could not be created.
*/
ServiceTicket grantServiceTicket(String ticketGrantingTicketId, Service service) throws TicketException;

Expand All @@ -132,7 +132,7 @@ <T extends Ticket> T getTicket(String ticketId, Class<? extends Ticket> clazz)
* @return Non-null service ticket identifier.
*
* @throws AuthenticationException on errors authenticating the credentials
* @throws TicketException if the ticket could not be created.
* @throws org.jasig.cas.ticket.TicketException if the ticket could not be created.
*/
ServiceTicket grantServiceTicket(
final String ticketGrantingTicketId, final Service service, final Credential... credentials)
Expand All @@ -146,7 +146,7 @@ ServiceTicket grantServiceTicket(
*
* @return Non-null ticket validation assertion.
*
* @throws TicketException if there was an error validating the ticket.
* @throws org.jasig.cas.ticket.TicketException if there was an error validating the ticket.
*/
Assertion validateServiceTicket(final String serviceTicketId, final Service service) throws TicketException;

Expand All @@ -172,7 +172,7 @@ ServiceTicket grantServiceTicket(
* that proxy authentication.
*
* @throws AuthenticationException on errors authenticating the credentials
* @throws TicketException if there was an error creating the ticket
* @throws org.jasig.cas.ticket.TicketException if there was an error creating the ticket
*/
TicketGrantingTicket delegateTicketGrantingTicket(final String serviceTicketId, final Credential... credentials)
throws AuthenticationException, TicketException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
import org.jasig.cas.services.UnauthorizedProxyingException;
import org.jasig.cas.services.UnauthorizedServiceException;
import org.jasig.cas.services.UnauthorizedSsoServiceException;
import org.jasig.cas.ticket.TicketException;
import org.jasig.cas.ticket.ExpirationPolicy;
import org.jasig.cas.ticket.InvalidTicketException;
import org.jasig.cas.ticket.ServiceTicket;
import org.jasig.cas.ticket.Ticket;
import org.jasig.cas.ticket.TicketException;
import org.jasig.cas.ticket.TicketGrantingTicket;
import org.jasig.cas.ticket.TicketGrantingTicketImpl;
import org.jasig.cas.ticket.TicketValidationException;
Expand Down Expand Up @@ -96,7 +96,7 @@
* @author William G. Thompson, Jr.
* @author Scott Battaglia
* @author Dmitry Kopylenko
* @since 3.0
* @since 3.0.0
*/
public final class CentralAuthenticationServiceImpl implements CentralAuthenticationService {

Expand Down Expand Up @@ -523,7 +523,7 @@ public void setPersistentIdGenerator(final PersistentIdGenerator persistentIdGen
* @param ticket the ticket
* @param context the context
* @return the authentication satisfied by policy
* @throws TicketException the ticket exception
* @throws org.jasig.cas.ticket.TicketException the ticket exception
*/
private Authentication getAuthenticationSatisfiedByPolicy(
final TicketGrantingTicket ticket, final ServiceContext context) throws TicketException {
Expand Down
2 changes: 1 addition & 1 deletion cas-server-core/src/main/java/org/jasig/cas/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* message string to use if no message code can be resolved.
*
* @author Marvin S. Addison
* @since 4.0
* @since 4.0.0
*/
public class Message implements Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


/**
* @author Scott Battaglia
* @since 3.3.6
*/
@Aspect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public TicketOrCredentialPrincipalResolver(final TicketRegistry ticketRegistry)
* Instantiates a new Ticket or credential principal resolver.
*
* @param centralAuthenticationService the central authentication service
* @since 4.1
* @since 4.1.0
*/
public TicketOrCredentialPrincipalResolver(final CentralAuthenticationService centralAuthenticationService) {
this.centralAuthenticationService = centralAuthenticationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Base class for all authentication handlers that support configurable naming.
*
* @author Marvin S. Addison
* @since 4.0
* @since 4.0.0
*/
public abstract class AbstractAuthenticationHandler implements AuthenticationHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Base class for CAS credentials that are safe for long-term storage.
*
* @author Marvin S. Addison
* @since 4.0
* @since 4.0.0
*/
public abstract class AbstractCredential implements Credential, CredentialMetaData, Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Produces authentication policies that passively satisfy any given {@link Authentication}.
*
* @author Marvin S. Addison
* @since 4.0
* @since 4.0.0
*/
public class AcceptAnyAuthenticationPolicyFactory implements ContextualAuthenticationPolicyFactory<ServiceContext> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@
* @author Scott Battaglia
* @author Marvin S. Addison
*
* @since 3.0
* @since 3.0.0
*/
public class AcceptUsersAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler {

/** The list of users we will accept. */
@NotNull
private Map<String, String> users;

/** {@inheritDoc} */
/**
* {@inheritDoc}
**/
@Override
protected final HandlerResult authenticateUsernamePasswordInternal(final UsernamePasswordCredential credential)
throws GeneralSecurityException, PreventedException {
Expand Down
Loading

0 comments on commit c2bb943

Please sign in to comment.