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
Add a build file for the main code. Make the sample project depend on this jar so that we don't need to update two copies of the code when making changes. Update the README to describe this new setup and convert it to a markdown file for better formatting
Copy file name to clipboardExpand all lines: README.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,35 @@
1
1
This example was developed to show how Java Toolkit works.
2
2
3
-
The com-folder contains the files you'll copy into your Java application.
4
-
The sample-folder has a minimal webapp with the files on com-folder inside java-folder and The files index.jsp and consume.jsp inside webapp-folder.
5
-
index.jsp and consume.jsp are the ones that actually handle the SAML conversation.
3
+
Project Structure
4
+
-----------------
6
5
7
-
The index.jsp file acts as an initiater for the SAML conversation, if it should be initiated by the application.
6
+
The com/ folder contains the files you'll copy into your Java application. Note also that Apache Commons Codec is a dependency.
7
+
8
+
The sample/ folder has a minimal webapp which depends on the core code inside com/ folder and the files index.jsp and consume.jsp inside webapp-folder.
9
+
index.jsp and consume.jsp are the ones that actually handle the SAML conversation. Dependencies are configured in the pom.xml file.
10
+
11
+
SAML Overview for project
12
+
-------------------------
13
+
14
+
The index.jsp file acts as an initiater for the SAML conversation, if it should be initiated by the application.
8
15
9
16
This is called Service Provider Initiated SAML. The service provider creates a SAML Authentication Request and sends it to the identity provider (IdP),
10
17
We authenticate at the IdP and then a Response is sent to the Consumer Service Url configured on index.jsp.
11
18
12
-
In order to know where to redirect the user with the authentication request, we need to establish the user's identity provider affinity.
19
+
In order to know where to redirect the user with the authentication request, we need to establish the user's identity provider affinity.
13
20
This depends on your application. In this example, those validations are provided by consume.jsp, which is meant as a stub for you customization.
14
21
15
-
Dependencies are configured on file pom.xml, also a jetty plugin is configured to execute the example with command "mvn jetty:run"
22
+
Running the sample
23
+
------------------
24
+
25
+
First install the core code into your local Maven repository with:
26
+
27
+
mvn install
28
+
29
+
You can now run the web app sample which depends on this code:
30
+
31
+
cd sample
32
+
mvn jetty:run
16
33
17
34
18
35
What needs to be configured
@@ -33,5 +50,5 @@ accSettings.setIdpSsoTargetUrl
33
50
The URL to which the authentication request should be sent. This would be on the identity provider.
34
51
35
52
accountSettings.setCertificate
36
-
The x509 certificate fingerprint.
53
+
The x509 certificate fingerprint.
37
54
This is provided from the identity provider when setting up the relationship, for this version the certificate must be 1024-bit.
0 commit comments