Hello there!

Need Help? We are right here!

miniOrange Email Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com

Java JWT Single Sign On (SSO) Connector


miniOrange Java JWT Single Sign On (SSO) Connector acts as a JWT Service Provider which can be configured to establish the trust between the SSO connector and the Identity Provider to securely authenticate the users into your application. The SSO connector uses the JWT protocol for exchanging authentication and authorization data with the Identity Provider.

In case you need our help with below integration or sample code for JWT for your language, feel free to reach out at idpsupport@xecurify.com.

Prerequisites

  • Add an Identity Provider. You can add any external IDP or directories (In case you don’t have IdP, you can use miniOrange as an Identity Provider).
  • Customizations support in mobile app to integrate sample code for enabling SSO.

Connect with External Source of Users


miniOrange provides user authentication from various external sources, which can be Directories (like ADFS, Microsoft Active Directory, Azure AD, OpenLDAP, Google, AWS Cognito etc), Identity Providers (like Shibboleth, Ping, Okta, OneLogin, KeyCloak), Databases (like MySQL, Maria DB, PostgreSQL) and many more.



Follow the Step-by-Step Guide given below for Java JWT SSO Connector

1. Steps to configure Java JWT SSO Connector

  • Download miniOrange Java Connector from here.
  • Copy the jar file and paste it in WEB-INF/lib folder of your project.
  • Copy the following code and paste it in web.xml file of your project.

  • 
                  <servlet>
                  <description></description>
                  <display-name>SSOServlet</display-name>
                  <servlet-name>SSOServlet</servlet-name>
                  <servlet-class>com.miniorange.app.servlets.SSOServlet</servlet-class>
                  </servlet>
                  <servlet-mapping>
                  <servlet-name>SSOServlet</servlet-name>
                  <url-pattern>/sso</url-pattern>
                  </servlet-mapping>
                  </servlet-mapping>
    							

  • Create a System Environment Variable named MO_SSO_CONFIG and give it a path. Here your properties files used by connector will be stored.
  • Java Single Sign-On (SSO) System Environment

  • Access SSO connector from your browser with URL https://<your-domain>/<application-name>/sso.
  • Register into SSO connector by providing a valid email address and password.
  • After registration, log in to the dashboard using the credentials you provided during registration.
  •  Java Single Sign-On (SSO) Login Dashboard

2. Go to miniOrange Dashboard

In miniOrange dashboard, you can add JWT application with steps below:

  • Login into miniOrange Admin Console.
  • Go to Apps >> Manage Apps.
  •  Java Single Sign-On (SSO) Manage Apps

  • Click on Add Applicaton button.
  •  Java Single Sign-On (SSO) Add Application

  • In Choose Application Type click on Create App button in JWT application type.
  • Java Single Sign-On (SSO) create JWT Application

  • In the next step, search for your application from the list, if your application is not found. Search for JWT App and you can set up your Application.
  • Java Single Sign-On (SSO) Add JWT Application

  • Copy the Redirect-URL from the JWT Connector.
  •  Java Single Sign-On (SSO) Redirect URL

  • Provide the Custom Application name of the JWT application and In the Redirect url section add the copied Redirect-URL from the JWT Connector and save the application.
  • In the Primary Identity Source section, select the Identity source from where you want the users to be authenticated.
  • Java Single Sign-On (SSO) Application Details

  • Now, click on edit option of the JWT application which we just created.
  • Copy client id, client secret and Single Sign on Url of the application.
  • Java Single Sign-On (SSO) SSO URL

  • Paste the client id, client secret in the client id and client secret fields of the connector and Single Sign on Url in the Auhtorization Url field of the connector.
  •  Java Single Sign-On (SSO) Auhtorizatization URL

  • Go to Apps and download the Certificate of the JWT application.
  • Java Single Sign-On (SSO) Certificate of JWT Application

  • Open the certificate in a text editor and paste it in the Signing Certificate field of the Connector.
  • Java Single Sign-On (SSO) Signing Certificate

  • In the Application URL field add the url where you want to redirect into your application after successful authentication and click on save.
  • After saving the configuration try Test Configuration.
  • Java Single Sign-On (SSO) Test Configuration

  • On the Application Url which we have previousl configured you need to read the user attributes from the session variable that is sent by SSO connector and use that to login user into your application.
  • You can use the following code snippet in your redirect endpoint to retrieve the attributes from the session variable.

  • HttpSession session = request.getSession(false);
    Map jwtResponseAttributes = (Map)request.getSession().getAttribute("attributes");
    

  • Now that the SSO Connector is configured, you're ready to use it in your application. Use the following URL as a link in your application from where you want to perform SSO:

  • http://<your-domain>/<application-name>/sso?action=login

Additional Resources



Want To Schedule A Demo?

Request a Demo
  


Our Other Identity & Access Management Products