Skip to content

Commit 00095a0

Browse files
committed
Clean project
1 parent ddf6328 commit 00095a0

8 files changed

Lines changed: 36 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Let's start describing them:
145145
#### core (com.onelogin:java-saml-core) ####
146146
This folder contains a maven project with the heart of java-saml, classes and methods to handle AuthNRequest, SAMLResponse, LogoutRequest, LogoutResponse and Metadata (low level API). In addition contains classes to load the settings of the toolkit and the HttpRequest class, a framework-agnostic representation of an HTTP request.
147147

148-
In the repo, at *src/main/java* you will find the source, at *src/main/main/resources/schemas* there are xsd schemas used to validate the SAML messages, at *src/test/java* are the tests for its classes and at *src/test/resources* different settings, SAML messages and certificates used on the junit tests.
148+
In the repo, at *src/main/java* you will find the source, at *src/main/resources/schemas* there are xsd schemas used to validate the SAML messages, at *src/test/java* are the tests for its classes and at *src/test/resources* different settings, SAML messages and certificates used on the junit tests.
149149

150150

151151
#### toolkit (com.onelogin:java-saml) ####

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<configuration>
117117
<rules>
118118
<evaluateBeanshell>
119-
<condition>javax.crypto.Cipher.getMaxAllowedKeyLength("AES") > 128</condition>
119+
<condition>javax.crypto.Cipher.getMaxAllowedKeyLength("AES") &gt; 128</condition>
120120
</evaluateBeanshell>
121121
</rules>
122122
</configuration>

core/src/main/java/com/onelogin/saml2/util/Preconditions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ public final class Preconditions {
66
*
77
* @param t the value to check for null
88
* @param message the message to include in the thrown exception
9-
* @return t
9+
*
10+
* @return T
11+
*
1012
* @throws NullPointerException if {@code t} is null
1113
*/
12-
public static <T> T checkNotNull(T t, String message) {
14+
public static <T>T checkNotNull(T t, String message) {
1315
if (t == null) {
1416
throw new NullPointerException(message);
1517
} else {

core/src/main/java/com/onelogin/saml2/util/Util.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public static String convertDocumentToString(Document doc) {
348348
}
349349

350350
/**
351-
* Returns a certificate in String format (adding header & footer if required)
351+
* Returns a certificate in String format (adding header and footer if required)
352352
*
353353
* @param cert
354354
* A x509 unformatted cert
@@ -375,7 +375,7 @@ public static String formatCert(String cert, Boolean heads) {
375375
}
376376

377377
/**
378-
* Returns a private key (adding header & footer if required).
378+
* Returns a private key (adding header and footer if required).
379379
*
380380
* @param key
381381
* A private key
@@ -1344,6 +1344,7 @@ public static long getExpireTime(String cacheDuration, long validUntil) {
13441344
* Create string form time In Millis with format yyyy-MM-ddTHH:mm:ssZ
13451345
*
13461346
* @param timeInMillis
1347+
* The time in Millis
13471348
*
13481349
* @return string with format yyyy-MM-ddTHH:mm:ssZ
13491350
*/
@@ -1354,16 +1355,18 @@ public static String formatDateTime(long timeInMillis) {
13541355
/**
13551356
* Create string form time In Millis with format yyyy-MM-ddTHH:mm:ssZ
13561357
*
1357-
* @param timeInMillis
1358+
* @param time
1359+
* The time
13581360
* @param millis
1361+
* Defines if the time is in Millis
13591362
*
13601363
* @return string with format yyyy-MM-ddTHH:mm:ssZ
13611364
*/
1362-
public static String formatDateTime(long timeInMillis, boolean millis) {
1365+
public static String formatDateTime(long time, boolean millis) {
13631366
if (millis) {
1364-
return DATE_TIME_FORMAT_MILLS.print(timeInMillis);
1367+
return DATE_TIME_FORMAT_MILLS.print(time);
13651368
} else {
1366-
return formatDateTime(timeInMillis);
1369+
return formatDateTime(time);
13671370
}
13681371
}
13691372

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@
172172
<groupId>org.apache.maven.plugins</groupId>
173173
<artifactId>maven-javadoc-plugin</artifactId>
174174
<version>2.9.1</version>
175+
<configuration>
176+
<additionalparam>-Xdoclint:none</additionalparam>
177+
</configuration>
175178
<executions>
176179
<execution>
177180
<id>attach-javadocs</id>

samples/java-saml-tookit-jspsample/src/main/webapp/attrs.jsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<h1>A Java SAML Toolkit by OneLogin demo</h1>
2929
<%
3030
Boolean found = false;
31+
@SuppressWarnings("unchecked")
3132
Enumeration<String> elems = (Enumeration<String>) session.getAttributeNames();
3233
3334
while (elems.hasMoreElements() && !found) {
@@ -39,6 +40,7 @@
3940
4041
if (found) {
4142
String nameId = (String) session.getAttribute("nameId");
43+
@SuppressWarnings("unchecked")
4244
Map<String, List<String>> attributes = (Map<String, List<String>>) session.getAttribute("attributes");
4345
4446
if (!nameId.isEmpty()) {

toolkit/src/main/java/com/onelogin/saml2/Auth.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,21 @@ public String buildResponseSignature(String samlResponse, String relayState, Str
708708
{
709709
return buildSignature(samlResponse, relayState, signAlgorithm, "SAMLResponse");
710710
}
711-
711+
712+
/**
713+
* Generates the Signature for a SAML Response
714+
*
715+
* @param samlResponse
716+
* The SAML Response
717+
* @param relayState
718+
* The RelayState
719+
* @param signAlgorithm
720+
* Signature algorithm method
721+
* @param type
722+
* The type of the message
723+
*
724+
* @return the base64 encoded signature
725+
*/
712726
private String buildSignature(String samlMessage, String relayState, String signAlgorithm, String type)
713727
{
714728
String signature = "";

toolkit/src/main/java/com/onelogin/saml2/servlet/ServletUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private ServletUtils() {
3232
* @return a HttpRequest
3333
*/
3434
public static HttpRequest makeHttpRequest(HttpServletRequest req) {
35-
//noinspection unchecked
35+
@SuppressWarnings("unchecked")
3636
final Map<String, String[]> paramsAsArray = (Map<String, String[]>) req.getParameterMap();
3737
final Map<String, List<String>> paramsAsList = new HashMap<>();
3838
for (Map.Entry<String, String[]> param : paramsAsArray.entrySet()) {

0 commit comments

Comments
 (0)