@finnairoyj/cdk-constructs-lib - v0.1.11
    Preparing search index...
    interface OAuthOptions {
        appDomainName: string;
        authErrorPageUri: string;
        clientId: string;
        domainHint?: string;
        issuer?: string;
        logoutRedirectUri: string;
        publicUriPrefixes: string[];
        scopes: string[];
        sessionValidity: number;
        wellKnownUri: string;
    }
    Index

    Properties

    appDomainName: string

    Application domain name

    authErrorPageUri: string

    URI to redirect to after authorization failure. The URI must be registered to the IDP as an allowed redirect URI. The URI must also be a public and require no authorization for it to work. Set to empty string '' to disable. A generic error will be displayed by the IDP

    '/public/auth-error.html'
    
    clientId: string

    The clientId passed to the IDP in the client_id property and is validated against the 'audience' (aud) claim of the JWT tokens. For example for EntraId, the clientId should be the Enterprise App ID related to this OIDC configuration

    domainHint?: string

    Providing a domain hint bypasses the email-based Home Realm Discovery (HRD) dialog during IDP authentication. This accelerates the UX for users that have multiple active logins, for example for MS EntraID

    'finnair.com'
    
    issuer?: string

    The 'issuer' (iss) claim value provided by the IDP for the access_token. Passing this value overrides the info read from the .well-known endpoint. This may be required for example for EntraID. Issuer of the id_token is always validated against the info from the .well-known endpoint

    `https://sts.windows.net/${tenantId}/` for MS Entra ID
    
    logoutRedirectUri: string

    URI to redirect the user after IDP logout. The logout URI must be registered to the IDP. If no redirect after logout is desired, set this to an empty string ''. In this case the user will be displayed a generic message by the IDP

    '/' to redirect to the login page
    
    '/public/logout.html' to redirect to static logout page
    
    publicUriPrefixes: string[]

    List of URI path prefix for paths that bypass authentication. Set to empty array [] to require auth for all paths. Use for example for static error pages. The path entry must start and end with / character

    ['/public/']
    
    [] No public paths
    
    scopes: string[]

    OAuth 2.0 scopes to request from the IDP

    sessionValidity: number

    Max session validity to use for refresh token. This should match to the session validity set by the IDP in order to avoid refresh token errors from IDP. The sessionValidity should also be loner than the validity of the access_token set by the IDP

    86400 seconds
    
    wellKnownUri: string

    The well-known data endpoint for the IDP

    `https://login.microsoftonline.com/${tenantId}/v2.0/.well-known/openid-configuration` for MS Entra ID