Interface DirectoryAuthenticationOption

Represents an option to open a directory session.

An extended bearer may be requested, and a specific application data that may be used to redirect or pass some application data. Some application claims may also be passed along. Application claims may be used to validate queries on third party servers. Third party servers may validate some requests and look for the application claims to satisfy or reject the request. You may also set the way the login should be done with ssoMode

  • 'try_silent' : if the bearer is still active and the server allows it, the login procedure will be silent if available, else the login procedure will redirect to the authentication server (this is the default mode).
  • 'silent_only' : if the bearer is still active and the server allows it, the login procedure will be silent, else the server responds with an error.
  • 'force_user_consent' : the login procedure will redirect to the authentication server all the time.

Sessions

interface DirectoryAuthenticationOption {
    adminToken?: boolean;
    appClaims?: string[];
    applicationData?: string;
    requestExtendedBearer?: boolean;
    ssoMode?: "try_silent" | "silent_only" | "force_user_consent";
}

Properties

adminToken?: boolean

The directory token will be an admin token.

appClaims?: string[]

The application claims.

applicationData?: string

The application data to include (maximum size 2048).

requestExtendedBearer?: boolean

An extended bearer request (defaults to false).

ssoMode?: "try_silent" | "silent_only" | "force_user_consent"

Tells the way the login should be done with ssoMode

  • 'try_silent' : if the bearer is still active and the server allows it, the login procedure will be silent if available, else the login procedure will redirect to the authentication server (this is the default mode).
  • 'silent_only' : if the bearer is still active and the server allows it, the login procedure will be silent, else the server responds with an error.
  • 'force_user_consent' : the login procedure will redirect to the authentication server all the time.