Auth Token in Odata

#1

I have some questions about the setting of the authorization for OData.
I have created the folder ODataSourceSystem where I have created the file SAPBW.json for the connection to SAPBW OData.
SAPBW.json:

{
    "id":"myid",
    "name":"myname",
    "authToken": "Basic USERPASSWORD",
    "webServiceConfig": {"id":"id_mywebServiceConfig"}
}

authToken is setted like a combination of the user and password’s strings that have been encripted according to Base 64.

The associated type is:

entity type ODataSourceSystem extends ExternalSourceSystem mixes Config type key 'myodatakey' {

	// Contains the root URL of the OData service.   
	webServiceConfig: WebServiceConfig

	// Authorization token of the OData service
	authToken: string
	
	@action(authz='always')
  	setPasswordSecret: member function(password: !string) js server

}

How may I avoid the using of authToken? I would like to set user and password via c3 console using the SetSecretValue() function.

:slight_smile:

0 Likes

#2

Hi Guilia,

The use of authtoken was provided for testing purposes only.

To enable you to securely manage credentials, the SourceSystem type provides the setSecretValue API. This API allows you to set credentials programmatically and securely.

Scott

0 Likes

#3

Thank you for the answer, would you like to explain me an easy simple procedure to make this, please?

0 Likes

#4

I solved my problem, bye.

0 Likes

closed #5
0 Likes