[java-identity-provider] branch master updated: Collapse out deprecated TicketService method.
Scott Cantor
cantor.2 at osu.edu
Tue Aug 27 14:26:14 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=0bb1a262086a7593dcc6b5e6e47906254e8ed9ec
The following commit(s) were added to refs/heads/master by this push:
new 0bb1a26 Collapse out deprecated TicketService method.
0bb1a26 is described below
commit 0bb1a262086a7593dcc6b5e6e47906254e8ed9ec
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Aug 27 14:26:10 2019 -0400
Collapse out deprecated TicketService method.
---
.../shibboleth/idp/cas/ticket/TicketService.java | 5 +--
.../shibboleth/idp/cas/ticket/TicketServiceEx.java | 48 ----------------------
.../idp/cas/flow/impl/BuildProxyChainAction.java | 12 +++---
.../idp/cas/flow/impl/GrantProxyTicketAction.java | 6 +--
.../cas/flow/impl/GrantServiceTicketAction.java | 10 ++---
.../idp/cas/flow/impl/InitializeProxyAction.java | 10 ++---
.../cas/flow/impl/ValidateProxyCallbackAction.java | 12 +++---
.../idp/cas/flow/impl/ValidateTicketAction.java | 12 +++---
.../idp/cas/ticket/impl/AbstractTicketService.java | 15 +------
.../idp/cas/ticket/impl/SimpleTicketService.java | 8 +++-
.../idp/cas/flow/impl/AbstractFlowActionTest.java | 4 +-
.../cas/flow/impl/ValidateTicketActionTest.java | 6 +--
.../idp/test/flows/cas/ProxyFlowTest.java | 4 +-
.../idp/test/flows/cas/ProxyValidateFlowTest.java | 4 +-
.../idp/test/flows/cas/SamlValidateFlowTest.java | 4 +-
.../test/flows/cas/ServiceValidateFlowTest.java | 4 +-
.../idp/test/flows/cas/ThrowingTicketService.java | 8 +---
.../idp/test/flows/cas/ValidateFlowTest.java | 4 +-
18 files changed, 58 insertions(+), 118 deletions(-)
diff --git a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketService.java b/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketService.java
index d0977ec..a0b8b5c 100644
--- a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketService.java
+++ b/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketService.java
@@ -27,14 +27,13 @@ import javax.annotation.Nullable;
*
* @author Marvin S. Addison
*/
- at Deprecated
public interface TicketService {
/**
* Creates and stores a ticket for the given service.
*
* @param id ID of ticket to create.
* @param expiry Expiration date of service ticket.
- * @param sessionId ID of IdP session in which ticket was created.
+ * @param state Additional state to be stored with the ticket.
* @param service Service for which ticket is granted.
* @param renew True to indicate the ticket was generated in response to a forced authentication, false otherwise.
*
@@ -44,8 +43,8 @@ public interface TicketService {
ServiceTicket createServiceTicket(
@Nonnull String id,
@Nonnull Instant expiry,
- @Nonnull String sessionId,
@Nonnull String service,
+ @Nonnull TicketState state,
boolean renew);
/**
diff --git a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketServiceEx.java b/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketServiceEx.java
deleted file mode 100644
index 54b7d2c..0000000
--- a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/ticket/TicketServiceEx.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.idp.cas.ticket;
-
-import java.time.Instant;
-
-import javax.annotation.Nonnull;
-
-/**
- * Extended CAS ticket management service.
- *
- * @author Marvin S. Addison
- */
-public interface TicketServiceEx extends TicketService {
- /**
- * Creates and stores a ticket for the given service.
- *
- * @param id ID of ticket to create.
- * @param expiry Expiration date of service ticket.
- * @param state Additional state to be stored with the ticket.
- * @param service Service for which ticket is granted.
- * @param renew True to indicate the ticket was generated in response to a forced authentication, false otherwise.
- *
- * @return Created service ticket.
- */
- @Nonnull
- ServiceTicket createServiceTicket(
- @Nonnull String id,
- @Nonnull Instant expiry,
- @Nonnull String service,
- @Nonnull TicketState state,
- boolean renew);
-}
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/BuildProxyChainAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/BuildProxyChainAction.java
index 3f614cf..bb26494 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/BuildProxyChainAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/BuildProxyChainAction.java
@@ -26,7 +26,7 @@ import net.shibboleth.idp.cas.protocol.TicketValidationResponse;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.Ticket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.utilities.java.support.logic.Constraint;
import org.opensaml.profile.action.ActionSupport;
@@ -53,7 +53,7 @@ public class BuildProxyChainAction
@Nonnull private final Logger log = LoggerFactory.getLogger(BuildProxyChainAction.class);
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx ticketServiceEx;
+ @Nonnull private final TicketService casTicketService;
/** Response. */
@Nullable private TicketValidationResponse response;
@@ -64,10 +64,10 @@ public class BuildProxyChainAction
/**
* Constructor.
*
- * @param ticketService Ticket service component.
+ * @param ticketService ticket service component.
*/
- public BuildProxyChainAction(@Nonnull final TicketServiceEx ticketService) {
- ticketServiceEx = Constraint.isNotNull(ticketService, "TicketService cannot be null");
+ public BuildProxyChainAction(@Nonnull final TicketService ticketService) {
+ casTicketService = Constraint.isNotNull(ticketService, "TicketService cannot be null");
}
@Override
@@ -98,7 +98,7 @@ public class BuildProxyChainAction
ProxyGrantingTicket pgt;
String pgtId = pt.getPgtId();
do {
- pgt = ticketServiceEx.fetchProxyGrantingTicket(pgtId);
+ pgt = casTicketService.fetchProxyGrantingTicket(pgtId);
if (pgt == null) {
log.debug("{} PGT {} not found", getLogPrefix(), pgtId);
ActionSupport.buildEvent(profileRequestContext, ProtocolError.BrokenProxyChain.event(this));
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantProxyTicketAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantProxyTicketAction.java
index 6c6810f..1815709 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantProxyTicketAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantProxyTicketAction.java
@@ -31,7 +31,7 @@ import net.shibboleth.idp.cas.protocol.ProxyTicketRequest;
import net.shibboleth.idp.cas.protocol.ProxyTicketResponse;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.idp.profile.config.SecurityConfiguration;
import net.shibboleth.idp.session.IdPSession;
@@ -69,7 +69,7 @@ public class GrantProxyTicketAction extends AbstractCASProtocolAction<ProxyTicke
@Nonnull private final ConfigLookupFunction<ProxyConfiguration> configLookupFunction;
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx casTicketService;
+ @Nonnull private final TicketService casTicketService;
/** Looks up IdP sessions. */
@Nonnull private final SessionResolver sessionResolver;
@@ -95,7 +95,7 @@ public class GrantProxyTicketAction extends AbstractCASProtocolAction<ProxyTicke
* @param ticketService Ticket service component.
* @param resolver session resolver
*/
- public GrantProxyTicketAction(@Nonnull final TicketServiceEx ticketService,
+ public GrantProxyTicketAction(@Nonnull final TicketService ticketService,
@Nonnull final SessionResolver resolver) {
casTicketService = Constraint.isNotNull(ticketService, "TicketService cannot be null");
sessionResolver = Constraint.isNotNull(resolver, "SessionResolver cannot be null");
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantServiceTicketAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantServiceTicketAction.java
index 0afe3c1..13dc4b9 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantServiceTicketAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/GrantServiceTicketAction.java
@@ -34,7 +34,7 @@ import net.shibboleth.idp.cas.protocol.ProtocolError;
import net.shibboleth.idp.cas.protocol.ServiceTicketRequest;
import net.shibboleth.idp.cas.protocol.ServiceTicketResponse;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.idp.profile.config.SecurityConfiguration;
@@ -76,7 +76,7 @@ public class GrantServiceTicketAction extends AbstractCASProtocolAction<ServiceT
@Nonnull private final Function<ProfileRequestContext, String> principalLookupFunction;
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx ticketServiceEx;
+ @Nonnull private final TicketService casTicketService;
/** Profile config. */
@Nullable private LoginConfiguration loginConfig;
@@ -98,8 +98,8 @@ public class GrantServiceTicketAction extends AbstractCASProtocolAction<ServiceT
*
* @param ticketService Ticket service component.
*/
- public GrantServiceTicketAction(@Nonnull final TicketServiceEx ticketService) {
- ticketServiceEx = Constraint.isNotNull(ticketService, "TicketService cannot be null");
+ public GrantServiceTicketAction(@Nonnull final TicketService ticketService) {
+ casTicketService = Constraint.isNotNull(ticketService, "TicketService cannot be null");
configLookupFunction = new ConfigLookupFunction<>(LoginConfiguration.class);
sessionContextFunction = new ChildContextLookup<>(SessionContext.class);
@@ -170,7 +170,7 @@ public class GrantServiceTicketAction extends AbstractCASProtocolAction<ServiceT
getPrincipalName(profileRequestContext),
authnResult.getAuthenticationInstant(),
authnResult.getAuthenticationFlowId());
- ticket = ticketServiceEx.createServiceTicket(
+ ticket = casTicketService.createServiceTicket(
securityConfig.getIdGenerator().generateIdentifier(),
Instant.now().plus(loginConfig.getTicketValidityPeriod(profileRequestContext)),
request.getService(),
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/InitializeProxyAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/InitializeProxyAction.java
index 3c65d1c..121c86b 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/InitializeProxyAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/InitializeProxyAction.java
@@ -25,7 +25,7 @@ import net.shibboleth.idp.cas.protocol.ProxyTicketRequest;
import net.shibboleth.idp.cas.protocol.ProxyTicketResponse;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.TicketContext;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.profile.ActionSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -61,15 +61,15 @@ public class InitializeProxyAction extends AbstractCASProtocolAction<ProxyTicket
@Nonnull private final Logger log = LoggerFactory.getLogger(InitializeProxyAction.class);
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx ticketServiceEx;
+ @Nonnull private final TicketService casTicketService;
/**
* Constructor.
*
* @param ticketService ticket service
*/
- public InitializeProxyAction(@Nonnull final TicketServiceEx ticketService) {
- ticketServiceEx = Constraint.isNotNull(ticketService, "Ticket service cannot be null.");
+ public InitializeProxyAction(@Nonnull final TicketService ticketService) {
+ casTicketService = Constraint.isNotNull(ticketService, "Ticket service cannot be null.");
}
@Override
@@ -98,7 +98,7 @@ public class InitializeProxyAction extends AbstractCASProtocolAction<ProxyTicket
if (result == null) {
try {
log.debug("{} Fetching proxy-granting ticket {}", getLogPrefix(), proxyTicketRequest.getPgt());
- final ProxyGrantingTicket pgt = ticketServiceEx.fetchProxyGrantingTicket(proxyTicketRequest.getPgt());
+ final ProxyGrantingTicket pgt = casTicketService.fetchProxyGrantingTicket(proxyTicketRequest.getPgt());
if (pgt == null) {
return ProtocolError.TicketExpired.event(this);
}
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateProxyCallbackAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateProxyCallbackAction.java
index 61babc6..be95b35 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateProxyCallbackAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateProxyCallbackAction.java
@@ -43,7 +43,7 @@ import net.shibboleth.idp.cas.proxy.ProxyValidator;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
import net.shibboleth.idp.cas.ticket.Ticket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.idp.profile.config.SecurityConfiguration;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -75,7 +75,7 @@ public class ValidateProxyCallbackAction
@Nonnull private final ProxyValidator proxyValidator;
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx ticketServiceEx;
+ @Nonnull private final TicketService casTicketService;
/** Profile config. */
@Nullable private ValidateConfiguration validateConfig;
@@ -99,9 +99,9 @@ public class ValidateProxyCallbackAction
* @param ticketService Ticket service component.
*/
public ValidateProxyCallbackAction(@Nonnull final ProxyValidator validator,
- @Nonnull final TicketServiceEx ticketService) {
+ @Nonnull final TicketService ticketService) {
proxyValidator = Constraint.isNotNull(validator, "ProxyValidator cannot be null");
- ticketServiceEx = Constraint.isNotNull(ticketService, "TicketService cannot be null");
+ casTicketService = Constraint.isNotNull(ticketService, "TicketService cannot be null");
configLookupFunction = new ConfigLookupFunction<>(ValidateConfiguration.class);
}
@@ -161,9 +161,9 @@ public class ValidateProxyCallbackAction
final Instant expiration =
Instant.now().plus(validateConfig.getTicketValidityPeriod(profileRequestContext));
if (ticket instanceof ServiceTicket) {
- ticketServiceEx.createProxyGrantingTicket(proxyIds.getPgtId(), expiration, (ServiceTicket) ticket);
+ casTicketService.createProxyGrantingTicket(proxyIds.getPgtId(), expiration, (ServiceTicket) ticket);
} else {
- ticketServiceEx.createProxyGrantingTicket(proxyIds.getPgtId(), expiration, (ProxyTicket) ticket);
+ casTicketService.createProxyGrantingTicket(proxyIds.getPgtId(), expiration, (ProxyTicket) ticket);
}
response.setPgtIou(proxyIds.getPgtIou());
} catch (final Exception e) {
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketAction.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketAction.java
index d54a48d..b46804e 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketAction.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketAction.java
@@ -31,7 +31,7 @@ import net.shibboleth.idp.cas.protocol.TicketValidationRequest;
import net.shibboleth.idp.cas.protocol.TicketValidationResponse;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.Ticket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -64,7 +64,7 @@ public class ValidateTicketAction extends AbstractCASProtocolAction<TicketValida
@Nonnull private final ConfigLookupFunction<ValidateConfiguration> configLookupFunction;
/** Manages CAS tickets. */
- @Nonnull private final TicketServiceEx ticketServiceEx;
+ @Nonnull private final TicketService casTicketService;
/** Profile config. */
@Nullable private ValidateConfiguration validateConfig;
@@ -77,8 +77,8 @@ public class ValidateTicketAction extends AbstractCASProtocolAction<TicketValida
*
* @param ticketService ticket service component
*/
- public ValidateTicketAction(@Nonnull final TicketServiceEx ticketService) {
- ticketServiceEx = Constraint.isNotNull(ticketService, "TicketService cannot be null");
+ public ValidateTicketAction(@Nonnull final TicketService ticketService) {
+ casTicketService = Constraint.isNotNull(ticketService, "TicketService cannot be null");
configLookupFunction = new ConfigLookupFunction<>(ValidateConfiguration.class);
}
@@ -112,9 +112,9 @@ public class ValidateTicketAction extends AbstractCASProtocolAction<TicketValida
final String ticketId = request.getTicket();
log.debug("Attempting to validate {}", ticketId);
if (ticketId.startsWith(LoginConfiguration.DEFAULT_TICKET_PREFIX)) {
- ticket = ticketServiceEx.removeServiceTicket(request.getTicket());
+ ticket = casTicketService.removeServiceTicket(request.getTicket());
} else if (ticketId.startsWith(ProxyConfiguration.DEFAULT_TICKET_PREFIX)) {
- ticket = ticketServiceEx.removeProxyTicket(ticketId);
+ ticket = casTicketService.removeProxyTicket(ticketId);
} else {
ActionSupport.buildEvent(profileRequestContext, ProtocolError.InvalidTicketFormat.event(this));
return;
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/AbstractTicketService.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/AbstractTicketService.java
index 9208cdf..db6afed 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/AbstractTicketService.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/AbstractTicketService.java
@@ -32,7 +32,7 @@ import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
import net.shibboleth.idp.cas.ticket.Ticket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.serialization.impl.ProxyGrantingTicketSerializer;
import net.shibboleth.idp.cas.ticket.serialization.impl.ProxyTicketSerializer;
import net.shibboleth.idp.cas.ticket.serialization.impl.ServiceTicketSerializer;
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
* @author Marvin S. Addison
* @since 3.3.0
*/
-public abstract class AbstractTicketService implements TicketServiceEx {
+public abstract class AbstractTicketService implements TicketService {
/** Map of ticket classes to context names. */
private static final Map<Class<? extends Ticket>, String> CONTEXT_CLASS_MAP = new HashMap<>();
@@ -95,17 +95,6 @@ public abstract class AbstractTicketService implements TicketServiceEx {
@Override
@Nonnull
- public ServiceTicket createServiceTicket(
- @Nonnull final String id,
- @Nonnull final Instant expiry,
- @Nonnull final String sessionId,
- @Nonnull final String service,
- final boolean renew) {
- throw new UnsupportedOperationException("This version of createServiceTicket is not supported");
- }
-
- @Override
- @Nonnull
public ProxyGrantingTicket createProxyGrantingTicket(
@Nonnull final String id,
@Nonnull final Instant expiry,
diff --git a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/SimpleTicketService.java b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/SimpleTicketService.java
index 324ef8f..586dee5 100644
--- a/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/SimpleTicketService.java
+++ b/idp-cas-impl/src/main/java/net/shibboleth/idp/cas/ticket/impl/SimpleTicketService.java
@@ -47,6 +47,7 @@ public class SimpleTicketService extends AbstractTicketService {
super(service);
}
+ /** {@inheritDoc} */
@Override
@Nonnull
public ServiceTicket createServiceTicket(
@@ -66,6 +67,7 @@ public class SimpleTicketService extends AbstractTicketService {
return st;
}
+ /** {@inheritDoc} */
@Override
@Nullable
public ServiceTicket removeServiceTicket(@Nonnull final String id) {
@@ -73,8 +75,9 @@ public class SimpleTicketService extends AbstractTicketService {
return delete(id, ServiceTicket.class);
}
- @Nonnull
+ /** {@inheritDoc} */
@Override
+ @Nonnull
public ProxyTicket createProxyTicket(
@Nonnull final String id,
@Nonnull final Instant expiry,
@@ -91,8 +94,9 @@ public class SimpleTicketService extends AbstractTicketService {
return pt;
}
- @Nullable
+ /** {@inheritDoc} */
@Override
+ @Nullable
public ProxyTicket removeProxyTicket(final @Nonnull String id) {
return delete(id, ProxyTicket.class);
}
diff --git a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/AbstractFlowActionTest.java b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/AbstractFlowActionTest.java
index 145c88b..05d8e6f 100644
--- a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/AbstractFlowActionTest.java
+++ b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/AbstractFlowActionTest.java
@@ -25,7 +25,7 @@ import net.shibboleth.idp.authn.AuthenticationResult;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.cas.ticket.impl.TicketIdentifierGenerationStrategy;
import net.shibboleth.idp.session.IdPSession;
@@ -64,7 +64,7 @@ public abstract class AbstractFlowActionTest extends AbstractTestNGSpringContext
protected static final String TEST_PRINCIPAL_NAME = "omega";
@Autowired
- protected TicketServiceEx ticketService;
+ protected TicketService ticketService;
private TicketIdentifierGenerationStrategy serviceTicketGenerator =
new TicketIdentifierGenerationStrategy("ST", 25);
diff --git a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketActionTest.java b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketActionTest.java
index e53f182..5b4fd85 100644
--- a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketActionTest.java
+++ b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/flow/impl/ValidateTicketActionTest.java
@@ -23,7 +23,7 @@ import net.shibboleth.idp.cas.protocol.TicketValidationRequest;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import org.springframework.webflow.execution.RequestContext;
import org.testng.annotations.Test;
@@ -74,7 +74,7 @@ public class ValidateTicketActionTest extends AbstractFlowActionTest {
@Test
public void testTicketRetrievalError() throws Exception {
- final TicketServiceEx throwingTicketService = mock(TicketServiceEx.class);
+ final TicketService throwingTicketService = mock(TicketService.class);
when(throwingTicketService.removeServiceTicket(any(String.class))).thenThrow(new RuntimeException("Broken"));
final RequestContext context = new TestContextBuilder(ValidateConfiguration.PROFILE_ID)
.addProtocolContext(new TicketValidationRequest(TEST_SERVICE, "ST-12345"), null)
@@ -123,7 +123,7 @@ public class ValidateTicketActionTest extends AbstractFlowActionTest {
assertNotNull(action.getCASResponse(getProfileContext(context)));
}
- private static ValidateTicketAction newAction(final TicketServiceEx service) {
+ private static ValidateTicketAction newAction(final TicketService service) {
final ValidateTicketAction action = new ValidateTicketAction(service);
try {
action.initialize();
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java
index 25c9f6b..9f38ca8 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyFlowTest.java
@@ -19,7 +19,7 @@ package net.shibboleth.idp.test.flows.cas;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.cas.ticket.impl.TicketIdentifierGenerationStrategy;
import net.shibboleth.idp.session.IdPSession;
@@ -56,7 +56,7 @@ public class ProxyFlowTest extends AbstractFlowTest {
@Autowired
@Qualifier("shibboleth.CASTicketService")
- private TicketServiceEx ticketService;
+ private TicketService ticketService;
@Autowired
private SessionManager sessionManager;
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyValidateFlowTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyValidateFlowTest.java
index 7c979ef..f5c7c61 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyValidateFlowTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ProxyValidateFlowTest.java
@@ -22,7 +22,7 @@ import javax.annotation.Nonnull;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.cas.ticket.impl.TicketIdentifierGenerationStrategy;
import net.shibboleth.idp.session.IdPSession;
@@ -55,7 +55,7 @@ public class ProxyValidateFlowTest extends AbstractFlowTest {
@Autowired
@Qualifier("shibboleth.CASTicketService")
- private TicketServiceEx ticketService;
+ private TicketService ticketService;
@Autowired
private SessionManager sessionManager;
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/SamlValidateFlowTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/SamlValidateFlowTest.java
index 0235305..4f90f04 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/SamlValidateFlowTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/SamlValidateFlowTest.java
@@ -19,7 +19,7 @@ package net.shibboleth.idp.test.flows.cas;
import net.shibboleth.idp.attribute.context.AttributeContext;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.profile.context.RelyingPartyContext;
import net.shibboleth.idp.session.IdPSession;
@@ -64,7 +64,7 @@ public class SamlValidateFlowTest extends AbstractFlowTest {
@Autowired
@Qualifier("shibboleth.CASTicketService")
- private TicketServiceEx ticketService;
+ private TicketService ticketService;
@Autowired
private SessionManager sessionManager;
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ServiceValidateFlowTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ServiceValidateFlowTest.java
index 078bdd1..51c6cdf 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ServiceValidateFlowTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ServiceValidateFlowTest.java
@@ -25,7 +25,7 @@ import javax.annotation.Nonnull;
import net.shibboleth.idp.attribute.context.AttributeContext;
import net.shibboleth.idp.cas.proxy.ProxyAuthenticator;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.profile.context.RelyingPartyContext;
import net.shibboleth.idp.session.IdPSession;
@@ -66,7 +66,7 @@ public class ServiceValidateFlowTest extends AbstractFlowTest {
@Autowired
@Qualifier("shibboleth.CASTicketService")
- private TicketServiceEx ticketService;
+ private TicketService ticketService;
@Autowired
private SessionManager sessionManager;
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ThrowingTicketService.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ThrowingTicketService.java
index ba3cc35..3add5ce 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ThrowingTicketService.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ThrowingTicketService.java
@@ -20,7 +20,7 @@ package net.shibboleth.idp.test.flows.cas;
import net.shibboleth.idp.cas.ticket.ProxyGrantingTicket;
import net.shibboleth.idp.cas.ticket.ProxyTicket;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import java.time.Instant;
@@ -33,11 +33,7 @@ import javax.annotation.Nullable;
*
* @author Marvin S. Addison
*/
-public class ThrowingTicketService implements TicketServiceEx {
- @Nonnull
- public ServiceTicket createServiceTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull String sessionId, @Nonnull String service, boolean renew) {
- throw new RuntimeException("createServiceTicket failed for ticket " + id);
- }
+public class ThrowingTicketService implements TicketService {
@Nonnull
public ServiceTicket createServiceTicket(@Nonnull String id, @Nonnull Instant expiry, @Nonnull String service, @Nonnull TicketState state, boolean renew) {
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ValidateFlowTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ValidateFlowTest.java
index 95a981b..fbaa572 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ValidateFlowTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/cas/ValidateFlowTest.java
@@ -20,7 +20,7 @@ package net.shibboleth.idp.test.flows.cas;
import javax.annotation.Nonnull;
import net.shibboleth.idp.cas.ticket.ServiceTicket;
-import net.shibboleth.idp.cas.ticket.TicketServiceEx;
+import net.shibboleth.idp.cas.ticket.TicketService;
import net.shibboleth.idp.cas.ticket.TicketState;
import net.shibboleth.idp.session.IdPSession;
import net.shibboleth.idp.session.SessionManager;
@@ -55,7 +55,7 @@ public class ValidateFlowTest extends AbstractFlowTest {
@Autowired
@Qualifier("shibboleth.CASTicketService")
- private TicketServiceEx ticketService;
+ private TicketService ticketService;
@Autowired
private SessionResolver sessionResolver;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list