Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add links to gitlab

...

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 nameDescriptionExample value
openid.example.configLocationLocation of .properties file that contains settingsclasspath:openid-example.properties
file:///etc/tomcat/openid-example.properties
openid.example.metadataUrlonePortal OpenID metadata urlhttps://fi.trivoreid.com/.well-known/openid-configuration
openid.example.redirectUrlOpenID Connect redirect URLhttps://<example-hostname>/openid-example/callback
openid.example.clientIdonePortal Management API clientID5892346374634783124
openid.example.clientSecretonePortal Management API clientSecretFjw526789fsAHf1j23TH312g3u
openid.example.scopeOpenID scope parameter valueopenid 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

...