You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,12 @@
5
5
Add SAML support to your Java applications using this library.
6
6
Forget those complicated libraries and use that open source library provided and supported by OneLogin Inc.
7
7
8
-
Version 2.X.X, compatible with java7 / java8.
8
+
Version >= 2.5.0 compatible with java8 / java9. Not compatible with java7
9
+
2.5.0 sets the 'strict' setting parameter to true.
10
+
2.5.0 uses xmlsec 2.1.4 which fixes [CVE-2019-12400](https://snyk.io/vuln/SNYK-JAVA-ORGAPACHESANTUARIO-460281)
11
+
12
+
13
+
Version 2.0.0 - 2.4.0, compatible with java7 / java8.
9
14
10
15
We [introduced some incompatibilities](https://github.com/onelogin/java-saml/issues/90), that could be fixed and make it compatible with java6.
11
16
@@ -82,7 +87,7 @@ Install it as a maven dependency:
82
87
<dependency>
83
88
<groupId>com.onelogin</groupId>
84
89
<artifactId>java-saml</artifactId>
85
-
<version>2.4.0</version>
90
+
<version>2.5.0</version>
86
91
</dependency>
87
92
```
88
93
@@ -105,8 +110,8 @@ java-saml (com.onelogin:java-saml-toolkit) has the following dependencies:
105
110
* For CI:
106
111
* org.jacoco:jacoco-maven-plugin
107
112
108
-
also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_Cryptography_Extension) is required. If you don't have it, download the version of [jce-6](http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html), [jce-7](http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html) or [jce-8](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html), unzip it, and drop its content at
109
-
*${java.home}/jre/lib/security/*
113
+
also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_Cryptography_Extension) is required. If you don't have it, download the version of [jce-8](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html), unzip it, and drop its content at
114
+
*${java.home}/jre/lib/security/*. JDK 9 and later offer the stronger cryptographic algorithms by default.
110
115
111
116
*toolkit:*
112
117
* com.onelogin:java-saml-core
@@ -118,7 +123,7 @@ also the [Java Cryptography Extension (JCE)](https://en.wikipedia.org/wiki/Java_
118
123
* org.apache.maven.plugins:maven-enforcer-plugin
119
124
120
125
For more info, open and read the different pom.xml files:
The Auth constructor supports the ability to read SP public cert/private key from a KeyStore. A KeyStoreSettings object must be provided with the KeyStore, the Alias and the KeyEntry password.
It is possible to build settings programmatically. You can load your values from different sources such as files, databases, or generated values.
356
389
@@ -393,11 +426,12 @@ We can set a 'returnTo' url parameter to the login function and that will be con
393
426
String targetUrl = 'https://example.com';
394
427
auth.login(returnTo=targetUrl)
395
428
```
396
-
The login method can receive 4 more optional parameters:
429
+
The login method can receive 5 more optional parameters:
397
430
-*forceAuthn* When true the AuthNRequest will have the 'ForceAuthn' attribute set to 'true'
398
431
-*isPassive* When true the AuthNRequest will have the 'Ispassive' attribute set to 'true'
399
432
-*setNameIdPolicy* When true the AuthNRequest will set a nameIdPolicy element.
400
433
-*stay* Set to true to stay (returns the url string), otherwise set to false to execute a redirection to that url (IdP SSO URL)
434
+
-*nameIdValueReq* Indicates to the IdP the subject that should be authenticated
401
435
402
436
By default, the login method initiates a redirect to the SAML Identity Provider. You can use the *stay* parameter, to prevent that, and execute the redirection manually. We need to use that if a match on the future SAMLResponse ID and the AuthNRequest ID to be sent is required. That AuthNRequest ID must be extracted and stored for future validation, so we can't execute the redirection on the login. Instead, set *stay* to true, then get that ID by
0 commit comments