SSOLite Core

A lightweight single sign on library (core module)

License

License

GroupId

GroupId

com.github.sahara3
ArtifactId

ArtifactId

ssolite-core
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

SSOLite Core
A lightweight single sign on library (core module)
Project URL

Project URL

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

Source Code Management

https://github.com/sahara3/ssolite

Download ssolite-core

How to add to project

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

Dependencies

provided (1)

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

runtime (4)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.26
org.dmfs : rfc3986-uri jar 0.8.1
com.squareup.okhttp3 : okhttp Optional jar 3.14.7
com.fasterxml.jackson.core : jackson-databind Optional jar 2.9.8

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