SSOLite Spring

A lightweight single sign on library (for Spring)

License

License

GroupId

GroupId

com.github.sahara3
ArtifactId

ArtifactId

ssolite-spring
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

SSOLite Spring
A lightweight single sign on library (for Spring)
Project URL

Project URL

https://github.com/sahara3/ssolite
Source Code Management

Source Code Management

https://github.com/sahara3/ssolite

Download ssolite-spring

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sahara3/ssolite-spring/ -->
<dependency>
    <groupId>com.github.sahara3</groupId>
    <artifactId>ssolite-spring</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sahara3/ssolite-spring/
implementation 'com.github.sahara3:ssolite-spring:1.0.0'
// https://jarcasting.com/artifacts/com.github.sahara3/ssolite-spring/
implementation ("com.github.sahara3:ssolite-spring:1.0.0")
'com.github.sahara3:ssolite-spring:jar:1.0.0'
<dependency org="com.github.sahara3" name="ssolite-spring" rev="1.0.0">
  <artifact name="ssolite-spring" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sahara3', module='ssolite-spring', version='1.0.0')
)
libraryDependencies += "com.github.sahara3" % "ssolite-spring" % "1.0.0"
[com.github.sahara3/ssolite-spring "1.0.0"]

Dependencies

compile (7)

Group / Artifact Type Version
com.github.sahara3 : ssolite-core jar 1.0.0
org.springframework.security : spring-security-core jar 5.0.12.RELEASE
org.springframework.security : spring-security-web jar 5.0.12.RELEASE
org.springframework.security : spring-security-config jar 5.0.12.RELEASE
com.fasterxml.jackson.core : jackson-core jar 2.9.8
com.fasterxml.jackson.core : jackson-databind jar 2.9.8
com.fasterxml.jackson.core : jackson-annotations jar 2.9.0

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.1.0

runtime (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.26
org.springframework : spring-core jar 5.0.13.RELEASE
org.springframework : spring-web jar 5.0.13.RELEASE

Project Modules

There are no modules declared in this project.

SSOLite

This is a lightweight Single Sign On library using Spring Security 5.

It consists of a server that performs authentication and a client that uses authenticated information provided by the server. The server does not provide authorization mechanism. Authorization is a client's job.

Samples

Server sample using Spring

'sample-server-spring' is a server sample using Spring. To run it:

$ ./gradlew sample-server-spring:bootRun

You can access this server with http://localhost:8080/. In the login page, you enter the username and password to login.

Client sample using Spring

'sample-client-spring' is a client sample using Spring. To run it:

$ ./gradlew sample-client-spring:bootRun

You can access this server with http://127.0.0.1:8081/. You will see the server login page if the server is running. After entering the correct username and password, you will retern the client page.

This client sample also has local login mechanism. You can access http://127.0.0.1:8081/login to login with the client-local username and password.

Client sample using Struts2

'sample-client-struts2' is a client sample using Struts2. To run it:

$ ./gradlew sample-client-struts2:tomcatRun

You can access this server with http://127.0.0.1:8081/. You will see the server login page if the server is running. After entering the correct username and password, you will retern the client page.

This client sample also has local login mechanism. You can access http://127.0.0.1:8081/login to login with the client-local username and password.

Mechanism

TODO

Server Configuration

To use SSOLite server library for Spring, set some properties in the server's application.properties (or application.yml, etc.).

# Set true on the server application.
ssolite.server.enabled = true

# Default redirecting URL after login.
# 'internal:' indicates the relative path from the context root.
ssolite.server.default-top-page-url = internal:/

# Permitted client URL that is used in the single sign on.
ssolite.server.permitted-domains[0] = http://<host>/sso-login
...

License

Apache License 2.0. See LICENSE file for details.

Versions

Version
1.0.0