...
There are example Java projects which utilises the Trivore Identity Service's SSO mechanisms. Both mechanisms have their own gitlab repository, from where they can be cloned. The Management API example project can be found here and the OpenID Connect mechanism example project can be found here.
Management API
Source The source code for example implementation of SSO target via Management API can be downloaded here: oneportal-sso-example.zipfrom gitlab.
Use maven to build this example. Result of the maven build is a simple .war package that can be deployed on Apache Tomcat or Eclipse Jetty.
...
Source code for example implementation of SSO target via OpenID Connect can be downloaded here: oneportal-openid-example.zipfrom gitlab.
Use maven to build this example. Result of the maven build is a simple .war package that can be deployed on Apache Tomcat or Eclipse Jetty.
...
When deploying the .war file to a servlet container, you need to define the following settings.
Property name | Description | Example value |
---|---|---|
openid.example.configLocation | Location of .properties file that contains settings | classpath:openid-example.properties file:///etc/tomcat/openid-example.properties |
openid.example.metadataUrl | onePortal OpenID metadata url | https://fi.trivoreid.com/.well-known/openid-configuration |
openid.example.redirectUrl | OpenID Connect redirect URL | https://<example-hostname>/openid-example/callback |
openid.example.clientId | onePortal Management API clientID | 5892346374634783124 |
openid.example.clientSecret | onePortal Management API clientSecret | Fjw526789fsAHf1j23TH312g3u |
openid.example.scope | OpenID scope parameter value | openid profile |
Property openid.example.configLocation
can be defined as (in order of preference) environment variable OPENID_EXAMPLE_CONFIG_LOCATION
, Java system property using -D
argument or as context init parameter in web.xml. Other properties can be defined as (in order of preference) Java system property, properties file defined by openid.example.configLocation
or context init parameter in web.xml. Preferred way to define these properties for Apache Tomcat on Linux is to edit /etc/tomcat/tomcat.conf
and add new line at the end
...