Skip to content

Default Authentication Method#

Prerequisite: Know how to use the Janssen CLI in command-line mode

Let's get the information of Default Authentication Method:

/opt/jans/jans-cli/config-cli.py --info DefaultAuthenticationMethod
Operation ID: get-acrs
  Description: Gets default authentication method.
Operation ID: put-acrs
  Description: Updates default authentication method.
  Schema: /components/schemas/AuthenticationMethod

To get sample shema type /opt/jans/jans-cli/config-cli.py --schema <schma>, for example /opt/jans/jans-cli/config-cli.py --schema /components/schemas/AuthenticationMethod

Table of Contents#

Find Current Authentication Method#

To get the default authentication method:

/opt/jans/jans-cli/config-cli.py --operation-id get-acrs
Getting access token for scope https://jans.io/oauth/config/acrs.readonly
{
  "defaultAcr": "simple_password_auth"
}

Update Default Authentication Method#

Let's update the Default Authentication Method using janssen CLI command line. To perform the put-acrs operation, we have to use its schema. To get its schema:

/opt/jans/jans-cli/config-cli.py --schema AuthenticationMethod > /tmp/patch-default-auth.json
{
  "defaultAcr": null
}

It will create a .json file with a schema. It comes with a null value. We need to modify this file to update default acr. we have seen that our Default Authentication Method is simple_password_auth. We are going to update it with passport_saml authenitcation method.

nano /tmp/patch-default-auth.json

update default authentication method

Now let's do the operation:

/opt/jans/jans-cli/config-cli.py --operation-id put-acrs --data /tmp/patch-default-auth.json

It will show the updated result.

updated result


Last update: 2023-08-03
Created: 2021-04-22