components/global/core/io.cellery.observability.api/src/main/java/io/cellery/observability/api/auth/OIDCOauthManager.java
private void retrieveClientCredentials() throws OIDCProviderException {
        if (this.clientId == null || this.clientSecret == null) {
            JSONObject jsonObject = createClientWithDcr();
            if (jsonObject.has(ERROR)) {
                logger.info("Fetching the credentials of the already existing client " + Constants.APPLICATION_NAME);
                jsonObject = retrieveExistingClientCredentials();
            }

            this.clientId = jsonObject.getString(Constants.CLIENT_ID_TXT);
            this.clientSecret = jsonObject.getString(Constants.CLIENT_SECRET_TXT).toCharArray();
        }
    }
/**
     * This method will fetch or create and fetch (if client application is not registered)
     * the client application's credentials from IDP.
     *
     * @return the credentials returned in JSON format
     * @throws OIDCProviderException if getting the Client Credentials fails
     */
This method will fetch or create and fetch (if client application is not registered)
the client application's credentials from IDP.

@return the credentials returned in JSON format
@throws OIDCProviderException if getting the Client Credentials fails
This method will fetch or create and fetch ( if client application is not registered ) the client application ' s credentials from IDP . @return the credentials returned in JSON format @throws OIDCProviderException if getting the Client Credentials fails
private void retrieveClientCredentials() throws OIDCProviderException {
        if (this.clientId == null || this.clientSecret == null) {
            JSONObject jsonObject = createClientWithDcr();
            if (jsonObject.has(ERROR)) {
                logger.info("Fetching the credentials of the already existing client " + Constants.APPLICATION_NAME);
                jsonObject = retrieveExistingClientCredentials();
            }
            this.clientId = jsonObject.getString(Constants.CLIENT_ID_TXT);
            this.clientSecret = jsonObject.getString(Constants.CLIENT_SECRET_TXT).toCharArray();
        }
    }
private void retrieveClientCredentials ( ) throws OIDCProviderException { if ( this . clientId == null || this . clientSecret == null ) { JSONObject jsonObject = createClientWithDcr ( ) ; if ( jsonObject . has ( ERROR ) ) { logger . info ( "Fetching the credentials of the already existing client " + Constants . APPLICATION_NAME ) ; jsonObject = retrieveExistingClientCredentials ( ) ; } this . clientId = jsonObject . getString ( Constants . CLIENT_ID_TXT ) ; this . clientSecret = jsonObject . getString ( Constants . CLIENT_SECRET_TXT ) . toCharArray ( ) ; } }
This method will fetch or create and fetch (if client application is not registered)
 the client application's credentials from IDP.
This method will fetch or create and fetch ( if client application is not registered ) the client application ' s credentials from IDP .