Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ist-unix
CAS-server
Commits
717e0038
Commit
717e0038
authored
Sep 24, 2015
by
Misagh Moayyed
Browse files
fixed issue with serialization
parent
1e69be0b
Changes
8
Hide whitespace changes
Inline
Side-by-side
cas-server-core-api/src/main/java/org/jasig/cas/authentication/principal/ResponseBuilder.java
View file @
717e0038
...
...
@@ -19,6 +19,8 @@
package
org.jasig.cas.authentication.principal
;
import
java.io.Serializable
;
/**
* Represents the task of building a CAS response
* that is returned by a service.
...
...
@@ -26,7 +28,7 @@ package org.jasig.cas.authentication.principal;
* @param <T> the type parameter
* @since 4.2.0
*/
public
interface
ResponseBuilder
<
T
extends
WebApplicationService
>
{
public
interface
ResponseBuilder
<
T
extends
WebApplicationService
>
extends
Serializable
{
/**
* Build response. The implementation must produce
...
...
cas-server-core/src/main/java/org/jasig/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java
View file @
717e0038
...
...
@@ -31,6 +31,8 @@ import java.util.Map;
* @since 4.2
*/
public
abstract
class
AbstractWebApplicationServiceResponseBuilder
implements
ResponseBuilder
<
WebApplicationService
>
{
private
static
final
long
serialVersionUID
=
-
4584738964007702423L
;
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
/**
...
...
cas-server-core/src/main/java/org/jasig/cas/authentication/principal/WebApplicationServiceResponseBuilder.java
View file @
717e0038
...
...
@@ -32,6 +32,7 @@ import java.util.Map;
* @since 4.2
*/
public
class
WebApplicationServiceResponseBuilder
extends
AbstractWebApplicationServiceResponseBuilder
{
private
static
final
long
serialVersionUID
=
-
851233878780818494L
;
private
final
Response
.
ResponseType
responseType
;
/**
...
...
cas-server-core/src/test/java/org/jasig/cas/util/http/SimpleHttpClientTests.java
View file @
717e0038
...
...
@@ -29,6 +29,7 @@ import javax.net.ssl.X509TrustManager;
import
org.apache.http.conn.ssl.NoopHostnameVerifier
;
import
org.apache.http.conn.ssl.SSLConnectionSocketFactory
;
import
org.junit.Ignore
;
import
org.junit.Test
;
/**
...
...
@@ -74,7 +75,9 @@ public class SimpleHttpClientTests {
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
@Override
public
void
checkClientTrusted
(
final
X509Certificate
[]
certs
,
final
String
authType
)
{}
@Override
public
void
checkServerTrusted
(
final
X509Certificate
[]
certs
,
final
String
authType
)
{}
};
final
SSLContext
sc
=
SSLContext
.
getInstance
(
"SSL"
);
...
...
cas-server-support-openid/src/main/java/org/jasig/cas/support/openid/authentication/principal/OpenIdServiceResponseBuilder.java
View file @
717e0038
...
...
@@ -25,7 +25,7 @@ import org.jasig.cas.authentication.principal.AbstractWebApplicationServiceRespo
import
org.jasig.cas.authentication.principal.Response
;
import
org.jasig.cas.authentication.principal.WebApplicationService
;
import
org.jasig.cas.support.openid.OpenIdProtocolConstants
;
import
org.jasig.cas.ticket.TicketException
;
import
org.jasig.cas.ticket.
Abstract
TicketException
;
import
org.jasig.cas.validation.Assertion
;
import
org.openid4java.association.Association
;
import
org.openid4java.message.AuthRequest
;
...
...
@@ -45,6 +45,8 @@ import java.util.Map;
*/
public
class
OpenIdServiceResponseBuilder
extends
AbstractWebApplicationServiceResponseBuilder
{
private
static
final
long
serialVersionUID
=
-
4581238964007702423L
;
private
final
ServerManager
serverManager
;
private
final
CentralAuthenticationService
centralAuthenticationService
;
private
final
ParameterList
parameterList
;
...
...
@@ -104,7 +106,7 @@ public class OpenIdServiceResponseBuilder extends AbstractWebApplicationServiceR
logger
.
warn
(
"Association does not exist or is not valid"
);
successFullAuthentication
=
false
;
}
}
catch
(
final
TicketException
te
)
{
}
catch
(
final
Abstract
TicketException
te
)
{
logger
.
error
(
"Could not validate ticket : {}"
,
te
.
getMessage
(),
te
);
successFullAuthentication
=
false
;
}
...
...
cas-server-support-openid/src/test/resources/log4j2.xml
0 → 100644
View file @
717e0038
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to Apereo under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Apereo 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 the following location:
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.
-->
<Configuration>
<Appenders>
<Console
name=
"console"
target=
"SYSTEM_OUT"
>
<PatternLayout
pattern=
"%d %p [%c] - <%m>%n"
/>
</Console>
<RollingFile
name=
"file"
fileName=
"target/openid.log"
append=
"true"
filePattern=
"openid-%d{yyyy-MM-dd-HH}-%i.log.gz"
>
<PatternLayout
pattern=
"%d %p [%c] - %m%n"
/>
<Policies>
<OnStartupTriggeringPolicy
/>
<SizeBasedTriggeringPolicy
size=
"10 MB"
/>
<TimeBasedTriggeringPolicy
/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root
level=
"warn"
>
<AppenderRef
ref=
"console"
/>
</Root>
</Loggers>
</Configuration>
cas-server-support-saml/src/main/java/org/jasig/cas/support/saml/authentication/principal/GoogleAccountsServiceResponseBuilder.java
View file @
717e0038
...
...
@@ -49,6 +49,8 @@ import java.util.Map;
*/
public
class
GoogleAccountsServiceResponseBuilder
extends
AbstractWebApplicationServiceResponseBuilder
{
private
static
final
long
serialVersionUID
=
-
4584732364007702423L
;
private
final
PrivateKey
privateKey
;
private
final
PublicKey
publicKey
;
private
final
GoogleSaml20ObjectBuilder
samlObjectBuilder
;
...
...
cas-server-support-saml/src/main/java/org/jasig/cas/support/saml/authentication/principal/SamlServiceResponseBuilder.java
View file @
717e0038
...
...
@@ -34,6 +34,8 @@ import java.util.Map;
*/
public
class
SamlServiceResponseBuilder
extends
AbstractWebApplicationServiceResponseBuilder
{
private
static
final
long
serialVersionUID
=
-
4584738964007702003L
;
@Override
public
Response
build
(
final
WebApplicationService
service
,
final
String
ticketId
)
{
final
Map
<
String
,
String
>
parameters
=
new
HashMap
<>();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment