Authentication (Node.js Example)
The Consumer API uses OpenID Connect and OAuth 2.0 for authentication.
This quickstart guides you through making your first OpenID Connect authentication using our Consumer API OpenID Connect example project.
Prerequisites
Before you get started, you’ll need to obtain the following from the back office administrator at your financial institution who has access to Banno People:
- API Credentials
- User Account
If the administrator does not know where to do this, they can review the External application configuration article on the Banno Knowledge site.
If you are a financial institution or working directly with a financial institution, you should work with the back office administrator at your institution to get appropriate access to Banno People.
If you are a fintech or other developer working without a financial institution, you are likely using the JackHenry.Dev developer portal. In this case, you will not have access to Banno People, however you will still have the ability to create and configure many aspects of your external application and plugin.
For more information on this, see our troubleshooting page.
API credentials
You’ll need API credentials to exercise the authorization flow. The Banno People administrator at your financial institution can provide you with a client_id
and client_secret
that you can use to access the Consumer API in your environment.
User account
You’ll need a user account to exercise the authorization flow with a test user.
Software requirements
Node.js, npm, nvm
The example is built for Node.js and npm.
If you don’t have these installed on your system already, you may want to install a Node Version Manager such as nvm.
Consumer API OpenID Connect example
Clone the Consumer API OpenID Connect Example repository.
Redirect URIs must use HTTPS except in local development. HTTPS is required for all production redirect URIs to properly secure the connection between your application and our API.
The only exception is for local development. The following is a list of local options which are included in the HTTP allowlist:
- Host names of localhost or those that end in .local
- Any address in the IPv4 range of 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 (which includes http://127.0.0.1)
Install project dependencies.
Running the example (locally)
After completing all steps from the Prerequisites section above…
Navigate to the root folder consumer-api-openid-connect-example/
.
Start the server by entering:
npm start
The server should now be running locally. You should see the following log statement in the terminal:
Environment: local
Server listening on http://localhost:8080...
Open http://localhost:8080/login.html in your browser.
Click on Sign in with Banno and sign in with your Banno Username and Password. You’ll be redirected to http://localhost:8080/me
and see the OpenID Connect claims for the user.
It should look similar to this example:
You’ll also see a log statement in the terminal that shows the access_token
, id_token
, and refresh_token
:
Where:
- The
access_token
contains authorization information about your application regarding which actions it is allowed to perform via the Consumer API. These actions map to the scopes (e.g. openid address email phone profile banno). - The
id_token
contains authentication information about the user (i.e. claims). - The
refresh_token
is a credential that can be used to retrieve a new access token (e.g. for when the access token has expired or otherwise been invalidated). - Both the
access_token
andid_token
are in JSON Web Token (JWT) format (see RFC 7519 for specification details).
Next steps
Congratulations! Continue your learning journey: