Skip to content

Commit 8924699

Browse files
committed
Move Cas Class
Closes gh-14627
1 parent e8c93fd commit 8924699

File tree

3 files changed

+52
-10
lines changed

3 files changed

+52
-10
lines changed

cas/src/main/java/org/springframework/security/cas/authentication/CasAuthenticationProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.springframework.security.authentication.AuthenticationProvider;
3232
import org.springframework.security.authentication.BadCredentialsException;
3333
import org.springframework.security.cas.ServiceProperties;
34-
import org.springframework.security.cas.web.authentication.ServiceAuthenticationDetails;
3534
import org.springframework.security.core.Authentication;
3635
import org.springframework.security.core.AuthenticationException;
3736
import org.springframework.security.core.SpringSecurityMessageSource;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2011-2024 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.security.cas.authentication;
18+
19+
import java.io.Serializable;
20+
21+
import org.springframework.security.cas.ServiceProperties;
22+
import org.springframework.security.core.Authentication;
23+
24+
/**
25+
* In order for the {@link CasAuthenticationProvider} to provide the correct service url
26+
* to authenticate the ticket, the returned value of {@link Authentication#getDetails()}
27+
* should implement this interface when tickets can be sent to any URL rather than only
28+
* {@link ServiceProperties#getService()}.
29+
*
30+
* @author Rob Winch
31+
* @see org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsSource
32+
*/
33+
public interface ServiceAuthenticationDetails extends Serializable {
34+
35+
/**
36+
* Gets the absolute service url (i.e. https://example.com/service/).
37+
* @return the service url. Cannot be <code>null</code>.
38+
*/
39+
String getServiceUrl();
40+
41+
}

cas/src/main/java/org/springframework/security/cas/web/authentication/ServiceAuthenticationDetails.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2023 the original author or authors.
2+
* Copyright 2011-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,22 +16,24 @@
1616

1717
package org.springframework.security.cas.web.authentication;
1818

19-
import java.io.Serializable;
20-
2119
import org.springframework.security.cas.ServiceProperties;
22-
import org.springframework.security.cas.authentication.CasAuthenticationProvider;
2320
import org.springframework.security.core.Authentication;
2421

2522
/**
26-
* In order for the {@link CasAuthenticationProvider} to provide the correct service url
27-
* to authenticate the ticket, the returned value of {@link Authentication#getDetails()}
28-
* should implement this interface when tickets can be sent to any URL rather than only
29-
* {@link ServiceProperties#getService()}.
23+
* In order for the
24+
* {@link org.springframework.security.cas.authentication.CasAuthenticationProvider} to
25+
* provide the correct service url to authenticate the ticket, the returned value of
26+
* {@link Authentication#getDetails()} should implement this interface when tickets can be
27+
* sent to any URL rather than only {@link ServiceProperties#getService()}.
3028
*
3129
* @author Rob Winch
3230
* @see ServiceAuthenticationDetailsSource
31+
* @deprecated Please use
32+
* org.springframework.security.cas.authentication.ServiceAuthenticationDetails
3333
*/
34-
public interface ServiceAuthenticationDetails extends Serializable {
34+
@Deprecated
35+
public interface ServiceAuthenticationDetails
36+
extends org.springframework.security.cas.authentication.ServiceAuthenticationDetails {
3537

3638
/**
3739
* Gets the absolute service url (i.e. https://example.com/service/).

0 commit comments

Comments
 (0)