Commit 86bf9866 authored by Misagh Moayyed's avatar Misagh Moayyed
Browse files

Merge branch 'master' into response-builders

Conflicts:
	cas-server-support-openid/src/main/java/org/jasig/cas/support/openid/authentication/principal/OpenIdService.java
parents 4268a7c8 4db3685e
...@@ -34,11 +34,14 @@ ...@@ -34,11 +34,14 @@
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId> <artifactId>commons-collections4</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
</dependencies> </dependencies>
<properties> <properties>
......
...@@ -23,7 +23,7 @@ import org.jasig.cas.authentication.AuthenticationException; ...@@ -23,7 +23,7 @@ import org.jasig.cas.authentication.AuthenticationException;
import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.Credential;
import org.jasig.cas.authentication.principal.Service; import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.logout.LogoutRequest; import org.jasig.cas.logout.LogoutRequest;
import org.jasig.cas.ticket.TicketException; import org.jasig.cas.ticket.AbstractTicketException;
import org.jasig.cas.ticket.InvalidTicketException; import org.jasig.cas.ticket.InvalidTicketException;
import org.jasig.cas.ticket.ServiceTicket; import org.jasig.cas.ticket.ServiceTicket;
import org.jasig.cas.ticket.Ticket; import org.jasig.cas.ticket.Ticket;
...@@ -66,10 +66,10 @@ public interface CentralAuthenticationService { ...@@ -66,10 +66,10 @@ public interface CentralAuthenticationService {
* @return Non-null ticket-granting ticket identifier. * @return Non-null ticket-granting ticket identifier.
* *
* @throws AuthenticationException on errors authenticating the credentials * @throws AuthenticationException on errors authenticating the credentials
* @throws org.jasig.cas.ticket.TicketException if ticket cannot be created * @throws AbstractTicketException if ticket cannot be created
*/ */
TicketGrantingTicket createTicketGrantingTicket(@NotNull Credential... credentials) TicketGrantingTicket createTicketGrantingTicket(@NotNull Credential... credentials)
throws AuthenticationException, TicketException; throws AuthenticationException, AbstractTicketException;
/** /**
...@@ -111,9 +111,9 @@ public interface CentralAuthenticationService { ...@@ -111,9 +111,9 @@ public interface CentralAuthenticationService {
* *
* @return Non-null service ticket identifier. * @return Non-null service ticket identifier.
* *
* @throws org.jasig.cas.ticket.TicketException if the ticket could not be created. * @throws AbstractTicketException if the ticket could not be created.
*/ */
ServiceTicket grantServiceTicket(@NotNull String ticketGrantingTicketId, @NotNull Service service) throws TicketException; ServiceTicket grantServiceTicket(@NotNull String ticketGrantingTicketId, @NotNull Service service) throws AbstractTicketException;
/** /**
* Grant a {@link org.jasig.cas.ticket.ServiceTicket} that may be used to access the given service * Grant a {@link org.jasig.cas.ticket.ServiceTicket} that may be used to access the given service
...@@ -133,11 +133,11 @@ public interface CentralAuthenticationService { ...@@ -133,11 +133,11 @@ public interface CentralAuthenticationService {
* @return Non-null service ticket identifier. * @return Non-null service ticket identifier.
* *
* @throws AuthenticationException on errors authenticating the credentials * @throws AuthenticationException on errors authenticating the credentials
* @throws org.jasig.cas.ticket.TicketException if the ticket could not be created. * @throws AbstractTicketException if the ticket could not be created.
*/ */
ServiceTicket grantServiceTicket( ServiceTicket grantServiceTicket(
@NotNull final String ticketGrantingTicketId, @NotNull final Service service, final Credential... credentials) @NotNull final String ticketGrantingTicketId, @NotNull final Service service, final Credential... credentials)
throws AuthenticationException, TicketException; throws AuthenticationException, AbstractTicketException;
/** /**
* Validate a ServiceTicket for a particular Service. * Validate a ServiceTicket for a particular Service.
...@@ -147,9 +147,9 @@ public interface CentralAuthenticationService { ...@@ -147,9 +147,9 @@ public interface CentralAuthenticationService {
* *
* @return Non-null ticket validation assertion. * @return Non-null ticket validation assertion.
* *
* @throws org.jasig.cas.ticket.TicketException if there was an error validating the ticket. * @throws AbstractTicketException if there was an error validating the ticket.
*/ */
Assertion validateServiceTicket(@NotNull final String serviceTicketId, @NotNull final Service service) throws TicketException; Assertion validateServiceTicket(@NotNull final String serviceTicketId, @NotNull final Service service) throws AbstractTicketException;
/** /**
* Destroy a TicketGrantingTicket and perform back channel logout. This has the effect of invalidating any * Destroy a TicketGrantingTicket and perform back channel logout. This has the effect of invalidating any
...@@ -173,8 +173,8 @@ public interface CentralAuthenticationService { ...@@ -173,8 +173,8 @@ public interface CentralAuthenticationService {
* that proxy authentication. * that proxy authentication.
* *
* @throws AuthenticationException on errors authenticating the credentials * @throws AuthenticationException on errors authenticating the credentials
* @throws org.jasig.cas.ticket.TicketException if there was an error creating the ticket * @throws AbstractTicketException if there was an error creating the ticket
*/ */
TicketGrantingTicket delegateTicketGrantingTicket(@NotNull final String serviceTicketId, @NotNull final Credential... credentials) TicketGrantingTicket delegateTicketGrantingTicket(@NotNull final String serviceTicketId, @NotNull final Credential... credentials)
throws AuthenticationException, TicketException; throws AuthenticationException, AbstractTicketException;
} }
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
*/ */
package org.jasig.cas.authentication; package org.jasig.cas.authentication;
import org.jasig.cas.authentication.principal.Principal;
import org.joda.time.DateTime;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jasig.cas.authentication.principal.Principal;
/** /**
* <p> * <p>
* The Authentication object represents a successful authentication request. It * The Authentication object represents a successful authentication request. It
...@@ -61,7 +61,7 @@ public interface Authentication extends Serializable { ...@@ -61,7 +61,7 @@ public interface Authentication extends Serializable {
* *
* @return the date/time the authentication occurred. * @return the date/time the authentication occurred.
*/ */
Date getAuthenticationDate(); DateTime getAuthenticationDate();
/** /**
* Attributes of the authentication (not the Principal). * Attributes of the authentication (not the Principal).
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
package org.jasig.cas.authentication; package org.jasig.cas.authentication;
import org.jasig.cas.authentication.principal.Principal; import org.jasig.cas.authentication.principal.Principal;
import org.joda.time.DateTime;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.Map; import java.util.Map;
/** /**
...@@ -92,7 +92,7 @@ public interface AuthenticationBuilder extends Serializable { ...@@ -92,7 +92,7 @@ public interface AuthenticationBuilder extends Serializable {
* *
* @return This builder instance. * @return This builder instance.
*/ */
AuthenticationBuilder setAuthenticationDate(Date d); AuthenticationBuilder setAuthenticationDate(DateTime d);
/** /**
* Creates an immutable authentication instance from builder data. * Creates an immutable authentication instance from builder data.
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
package org.jasig.cas.authentication; package org.jasig.cas.authentication;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** /**
...@@ -27,7 +28,6 @@ import javax.validation.constraints.NotNull; ...@@ -27,7 +28,6 @@ import javax.validation.constraints.NotNull;
* *
* @author Misagh Moayyed * @author Misagh Moayyed
* see org.jasig.cas.authentication.handler.AuthenticationException * see org.jasig.cas.authentication.handler.AuthenticationException
* @see org.jasig.cas.ticket.TicketException
* @since 4.0.0 * @since 4.0.0
*/ */
public abstract class RootCasException extends Exception { public abstract class RootCasException extends Exception {
......
...@@ -21,14 +21,12 @@ package org.jasig.cas.ticket; ...@@ -21,14 +21,12 @@ package org.jasig.cas.ticket;
import org.jasig.cas.authentication.RootCasException; import org.jasig.cas.authentication.RootCasException;
/** /**
* Generic ticket exception. Top of the TicketException hierarchy. * Generic ticket exception. Top of the AbstractTicketException hierarchy.
* *
* @author Scott Battaglia * @author Scott Battaglia
* @since 3.0.0 * @since 4.2.0
* @deprecated As of 4.1, the class is required to note its abstractness in the name and will be renamed in the future.
*/ */
@Deprecated public abstract class AbstractTicketException extends RootCasException {
public abstract class TicketException extends RootCasException {
private static final long serialVersionUID = -5128676415951733624L; private static final long serialVersionUID = -5128676415951733624L;
/** /**
...@@ -37,7 +35,7 @@ public abstract class TicketException extends RootCasException { ...@@ -37,7 +35,7 @@ public abstract class TicketException extends RootCasException {
* @param code the code * @param code the code
* @param throwable the throwable * @param throwable the throwable
*/ */
public TicketException(final String code, final Throwable throwable) { public AbstractTicketException(final String code, final Throwable throwable) {
super(code, throwable); super(code, throwable);
} }
...@@ -46,7 +44,7 @@ public abstract class TicketException extends RootCasException { ...@@ -46,7 +44,7 @@ public abstract class TicketException extends RootCasException {
* *
* @param code the code * @param code the code
*/ */
public TicketException(final String code) { public AbstractTicketException(final String code) {
super(code); super(code);
} }
...@@ -56,7 +54,7 @@ public abstract class TicketException extends RootCasException { ...@@ -56,7 +54,7 @@ public abstract class TicketException extends RootCasException {
* @param code the code * @param code the code
* @param msg the msg * @param msg the msg
*/ */
public TicketException(final String code, final String msg) { public AbstractTicketException(final String code, final String msg) {
super(code, msg); super(code, msg);
} }
} }
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
package org.jasig.cas.ticket; package org.jasig.cas.ticket;
/** /**
* TicketException to alert that a Ticket was not found or that it is expired. * AbstractTicketException to alert that a Ticket was not found or that it is expired.
* *
* @author Scott Battaglia * @author Scott Battaglia
* @since 3.0.0 * @since 3.0.0
*/ */
public class InvalidTicketException extends TicketException { public class InvalidTicketException extends AbstractTicketException {
private static final long serialVersionUID = 9141891414482490L; private static final long serialVersionUID = 9141891414482490L;
......
...@@ -21,25 +21,23 @@ package org.jasig.cas; ...@@ -21,25 +21,23 @@ package org.jasig.cas;
import com.codahale.metrics.annotation.Counted; import com.codahale.metrics.annotation.Counted;
import com.codahale.metrics.annotation.Metered; import com.codahale.metrics.annotation.Metered;
import com.codahale.metrics.annotation.Timed; import com.codahale.metrics.annotation.Timed;
import org.jasig.cas.authentication.AuthenticationBuilder;
import org.jasig.cas.logout.LogoutRequest;
import org.jasig.inspektr.audit.annotation.Audit;
import org.apache.commons.collections4.Predicate; import org.apache.commons.collections4.Predicate;
import org.jasig.cas.authentication.AcceptAnyAuthenticationPolicyFactory; import org.jasig.cas.authentication.AcceptAnyAuthenticationPolicyFactory;
import org.jasig.cas.authentication.Authentication; import org.jasig.cas.authentication.Authentication;
import org.jasig.cas.authentication.DefaultAuthenticationBuilder; import org.jasig.cas.authentication.AuthenticationBuilder;
import org.jasig.cas.authentication.AuthenticationException; import org.jasig.cas.authentication.AuthenticationException;
import org.jasig.cas.authentication.AuthenticationManager; import org.jasig.cas.authentication.AuthenticationManager;
import org.jasig.cas.authentication.ContextualAuthenticationPolicy; import org.jasig.cas.authentication.ContextualAuthenticationPolicy;
import org.jasig.cas.authentication.ContextualAuthenticationPolicyFactory; import org.jasig.cas.authentication.ContextualAuthenticationPolicyFactory;
import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.Credential;
import org.jasig.cas.authentication.DefaultAuthenticationBuilder;
import org.jasig.cas.authentication.MixedPrincipalException; import org.jasig.cas.authentication.MixedPrincipalException;
import org.jasig.cas.authentication.principal.DefaultPrincipalFactory; import org.jasig.cas.authentication.principal.DefaultPrincipalFactory;
import org.jasig.cas.authentication.principal.PersistentIdGenerator;
import org.jasig.cas.authentication.principal.Principal; import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.PrincipalFactory; import org.jasig.cas.authentication.principal.PrincipalFactory;
import org.jasig.cas.authentication.principal.Service; import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.logout.LogoutManager; import org.jasig.cas.logout.LogoutManager;
import org.jasig.cas.logout.LogoutRequest;
import org.jasig.cas.services.AttributeReleasePolicy; import org.jasig.cas.services.AttributeReleasePolicy;
import org.jasig.cas.services.RegisteredService; import org.jasig.cas.services.RegisteredService;
import org.jasig.cas.services.ServiceContext; import org.jasig.cas.services.ServiceContext;
...@@ -48,12 +46,12 @@ import org.jasig.cas.services.UnauthorizedProxyingException; ...@@ -48,12 +46,12 @@ import org.jasig.cas.services.UnauthorizedProxyingException;
import org.jasig.cas.services.UnauthorizedServiceException; import org.jasig.cas.services.UnauthorizedServiceException;
import org.jasig.cas.services.UnauthorizedServiceForPrincipalException; import org.jasig.cas.services.UnauthorizedServiceForPrincipalException;
import org.jasig.cas.services.UnauthorizedSsoServiceException; import org.jasig.cas.services.UnauthorizedSsoServiceException;
import org.jasig.cas.ticket.AbstractTicketException;
import org.jasig.cas.ticket.ExpirationPolicy; import org.jasig.cas.ticket.ExpirationPolicy;
import org.jasig.cas.ticket.InvalidTicketException; import org.jasig.cas.ticket.InvalidTicketException;
import org.jasig.cas.ticket.ServiceTicket; import org.jasig.cas.ticket.ServiceTicket;
import org.jasig.cas.ticket.Ticket; import org.jasig.cas.ticket.Ticket;
import org.jasig.cas.ticket.TicketCreationException; import org.jasig.cas.ticket.TicketCreationException;
import org.jasig.cas.ticket.TicketException;
import org.jasig.cas.ticket.TicketGrantingTicket; import org.jasig.cas.ticket.TicketGrantingTicket;
import org.jasig.cas.ticket.TicketGrantingTicketImpl; import org.jasig.cas.ticket.TicketGrantingTicketImpl;
import org.jasig.cas.ticket.UnrecognizableServiceForServiceTicketValidationException; import org.jasig.cas.ticket.UnrecognizableServiceForServiceTicketValidationException;
...@@ -63,6 +61,7 @@ import org.jasig.cas.util.DefaultUniqueTicketIdGenerator; ...@@ -63,6 +61,7 @@ import org.jasig.cas.util.DefaultUniqueTicketIdGenerator;
import org.jasig.cas.util.UniqueTicketIdGenerator; import org.jasig.cas.util.UniqueTicketIdGenerator;
import org.jasig.cas.validation.Assertion; import org.jasig.cas.validation.Assertion;
import org.jasig.cas.validation.ImmutableAssertion; import org.jasig.cas.validation.ImmutableAssertion;
import org.jasig.inspektr.audit.annotation.Audit;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.Assert; import org.springframework.util.Assert;
...@@ -248,7 +247,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -248,7 +247,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
public ServiceTicket grantServiceTicket( public ServiceTicket grantServiceTicket(
final String ticketGrantingTicketId, final String ticketGrantingTicketId,
final Service service, final Credential... credentials) final Service service, final Credential... credentials)
throws AuthenticationException, TicketException { throws AuthenticationException, AbstractTicketException {
final TicketGrantingTicket ticketGrantingTicket = getTicket(ticketGrantingTicketId, TicketGrantingTicket.class); final TicketGrantingTicket ticketGrantingTicket = getTicket(ticketGrantingTicketId, TicketGrantingTicket.class);
final RegisteredService registeredService = this.servicesManager.findServiceBy(service); final RegisteredService registeredService = this.servicesManager.findServiceBy(service);
...@@ -377,7 +376,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -377,7 +376,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
@Counted(name="GRANT_SERVICE_TICKET_COUNTER", monotonic=true) @Counted(name="GRANT_SERVICE_TICKET_COUNTER", monotonic=true)
@Override @Override
public ServiceTicket grantServiceTicket(final String ticketGrantingTicketId, public ServiceTicket grantServiceTicket(final String ticketGrantingTicketId,
final Service service) throws TicketException { final Service service) throws AbstractTicketException {
try { try {
return this.grantServiceTicket(ticketGrantingTicketId, service, (Credential[]) null); return this.grantServiceTicket(ticketGrantingTicketId, service, (Credential[]) null);
} catch (final AuthenticationException e) { } catch (final AuthenticationException e) {
...@@ -394,7 +393,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -394,7 +393,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
@Counted(name="GRANT_PROXY_GRANTING_TICKET_COUNTER", monotonic=true) @Counted(name="GRANT_PROXY_GRANTING_TICKET_COUNTER", monotonic=true)
@Override @Override
public TicketGrantingTicket delegateTicketGrantingTicket(final String serviceTicketId, final Credential... credentials) public TicketGrantingTicket delegateTicketGrantingTicket(final String serviceTicketId, final Credential... credentials)
throws AuthenticationException, TicketException { throws AuthenticationException, AbstractTicketException {
final ServiceTicket serviceTicket = this.serviceTicketRegistry.getTicket(serviceTicketId, ServiceTicket.class); final ServiceTicket serviceTicket = this.serviceTicketRegistry.getTicket(serviceTicketId, ServiceTicket.class);
...@@ -434,7 +433,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -434,7 +433,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
@Metered(name="VALIDATE_SERVICE_TICKET_METER") @Metered(name="VALIDATE_SERVICE_TICKET_METER")
@Counted(name="VALIDATE_SERVICE_TICKET_COUNTER", monotonic=true) @Counted(name="VALIDATE_SERVICE_TICKET_COUNTER", monotonic=true)
@Override @Override
public Assertion validateServiceTicket(final String serviceTicketId, final Service service) throws TicketException { public Assertion validateServiceTicket(final String serviceTicketId, final Service service) throws AbstractTicketException {
final RegisteredService registeredService = this.servicesManager.findServiceBy(service); final RegisteredService registeredService = this.servicesManager.findServiceBy(service);
verifyRegisteredServiceProperties(registeredService, service); verifyRegisteredServiceProperties(registeredService, service);
...@@ -497,7 +496,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -497,7 +496,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
@Counted(name="CREATE_TICKET_GRANTING_TICKET_COUNTER", monotonic=true) @Counted(name="CREATE_TICKET_GRANTING_TICKET_COUNTER", monotonic=true)
@Override @Override
public TicketGrantingTicket createTicketGrantingTicket(final Credential... credentials) public TicketGrantingTicket createTicketGrantingTicket(final Credential... credentials)
throws AuthenticationException, TicketException { throws AuthenticationException, AbstractTicketException {
final Set<Credential> sanitizedCredentials = sanitizeCredentials(credentials); final Set<Credential> sanitizedCredentials = sanitizeCredentials(credentials);
if (!sanitizedCredentials.isEmpty()) { if (!sanitizedCredentials.isEmpty()) {
...@@ -580,17 +579,6 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -580,17 +579,6 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
this.serviceTicketExpirationPolicy = serviceTicketExpirationPolicy; this.serviceTicketExpirationPolicy = serviceTicketExpirationPolicy;
} }
/**
* @deprecated
* Sets persistent id generator.
*
* @param persistentIdGenerator the persistent id generator
*/
@Deprecated
public void setPersistentIdGenerator(final PersistentIdGenerator persistentIdGenerator) {
logger.warn("setPersistentIdGenerator() is deprecated and no longer available. Consider "
+ "configuring the an attribute provider for service definitions.");
}
/** /**
* Sets principal factory to create principal objects. * Sets principal factory to create principal objects.
...@@ -608,10 +596,10 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica ...@@ -608,10 +596,10 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
* @param ticket the ticket * @param ticket the ticket
* @param context the context * @param context the context
* @return the authentication satisfied by policy * @return the authentication satisfied by policy
* @throws org.jasig.cas.ticket.TicketException the ticket exception * @throws AbstractTicketException the ticket exception
*/ */
private Authentication getAuthenticationSatisfiedByPolicy( private Authentication getAuthenticationSatisfiedByPolicy(
final TicketGrantingTicket ticket, final ServiceContext context) throws TicketException { final TicketGrantingTicket ticket, final ServiceContext context) throws AbstractTicketException {
final ContextualAuthenticationPolicy<ServiceContext> policy = final ContextualAuthenticationPolicy<ServiceContext> policy =
serviceContextAuthenticationPolicyFactory.createPolicy(context); serviceContextAuthenticationPolicyFactory.createPolicy(context);
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
package org.jasig.cas.audit.spi; package org.jasig.cas.audit.spi;
import org.jasig.inspektr.common.spi.PrincipalResolver;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.jasig.cas.CentralAuthenticationService; import org.jasig.cas.CentralAuthenticationService;
import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.Credential;
...@@ -26,8 +25,8 @@ import org.jasig.cas.ticket.InvalidTicketException; ...@@ -26,8 +25,8 @@ import org.jasig.cas.ticket.InvalidTicketException;
import org.jasig.cas.ticket.ServiceTicket; import org.jasig.cas.ticket.ServiceTicket;
import org.jasig.cas.ticket.Ticket; import org.jasig.cas.ticket.Ticket;
import org.jasig.cas.ticket.TicketGrantingTicket; import org.jasig.cas.ticket.TicketGrantingTicket;
import org.jasig.cas.ticket.registry.TicketRegistry;
import org.jasig.cas.util.AopUtils; import org.jasig.cas.util.AopUtils;
import org.jasig.inspektr.common.spi.PrincipalResolver;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
...@@ -52,19 +51,6 @@ public final class TicketOrCredentialPrincipalResolver implements PrincipalResol ...@@ -52,19 +51,6 @@ public final class TicketOrCredentialPrincipalResolver implements PrincipalResol
@NotNull @NotNull
private final CentralAuthenticationService centralAuthenticationService; private final CentralAuthenticationService centralAuthenticationService;
/**
* Instantiates a new ticket or credential principal resolver.
*
* @deprecated As of 4.1 access to the registry is no longer relevant
* Consider using alternative constructors instead.
* @param ticketRegistry the ticket registry
*/
@Deprecated
public TicketOrCredentialPrincipalResolver(final TicketRegistry ticketRegistry) {
LOGGER.warn("The constructor is deprecated and will be removed. Consider an alternate constructor");
this.centralAuthenticationService = null;
}
/** /**
* Instantiates a new Ticket or credential principal resolver. * Instantiates a new Ticket or credential principal resolver.
* *
......
...@@ -23,7 +23,6 @@ import org.joda.time.DateTime; ...@@ -23,7 +23,6 @@ import org.joda.time.DateTime;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -88,8 +87,8 @@ public class DefaultAuthenticationBuilder implements AuthenticationBuilder { ...@@ -88,8 +87,8 @@ public class DefaultAuthenticationBuilder implements AuthenticationBuilder {
* @return This builder instance. * @return This builder instance.
*/ */
@Override @Override
public AuthenticationBuilder setAuthenticationDate(final Date d) { public AuthenticationBuilder setAuthenticationDate(final DateTime d) {
this.authenticationDate = new DateTime(d); this.authenticationDate = d;
return this; return this;