src/main/js/oidc-connector.js
/**
     * Set parameters used in doConnect calls. Fetches OIDC configuration if needed.
     * @param {OIDCConnect.InitConfiguration} config
     * @return Promise (if supported)
     * @memberOf OIDCConnect
     */
Set parameters used in doConnect calls. Fetches OIDC configuration if needed.
Set parameters used in doConnect calls . Fetches OIDC configuration if needed .
function doInit( config ) {
        if ( !config ) {
            throw Error( `[${TAG}] doInit - missing configuration. You need to pass a configuration object.` );
        }
        const hasPromise = ( 'Promise' in window );
        if ( hasPromise ) {
            return new Promise( resolve => {
                if ( !config.oauth_url && ( config.oidc_url || CONFIG.oidc_url ) ) {
                    doGetOIDCConfig( config.oidc_url || CONFIG.oidc_url, () => {
                        updateConfig( config );
                        resolve();
                    } );
                } else {
                    updateConfig( config );
                    resolve();
                }
            } );
        } else {
            if ( !config.oauth_url && ( config.oidc_url || CONFIG.oidc_url ) ) {
                doGetOIDCConfig( config.oidc_url || CONFIG.oidc_url, updateConfig.bind( null, config ) );
            } else {
                updateConfig( config );
            }
        }
    }
function doInit ( config ) { if ( ! config ) { throw Error ( ` ${ TAG } ` ) ; } const hasPromise = ( 'Promise' in window ) ; if ( hasPromise ) { return new Promise ( resolve => { if ( ! config . oauth_url && ( config . oidc_url || CONFIG . oidc_url ) ) { doGetOIDCConfig ( config . oidc_url || CONFIG . oidc_url , ( ) => { updateConfig ( config ) ; resolve ( ) ; } ) ; } else { updateConfig ( config ) ; resolve ( ) ; } } ) ; } else { if ( ! config . oauth_url && ( config . oidc_url || CONFIG . oidc_url ) ) { doGetOIDCConfig ( config . oidc_url || CONFIG . oidc_url , updateConfig . bind ( null , config ) ) ; } else { updateConfig ( config ) ; } } }
Set parameters used in doConnect calls.
Set parameters used in doConnect calls .