cancel
Showing results for 
Search instead for 
Did you mean: 

Username / password auth via post request

Matthias
New Contributor III

We've got a service that needs authentication via Post/Put request with the following body:

```

{
"U":"someUsername",
"P":"someSecurePassword",
"L":"EN"
}
```
 
Now with the rest post snap, i can  store the data in a "basic auth" account, and use the following:
``` 
'{
"U":"' + account.username + '",
"P":"' + account.password + '",
"L":"EN"
}'
```
now reading the Rest Api documentation, it is pointing me to use the HTTP client - which i tried, but this doesn't seem to give this option? 

is there any way to accomplish the same thing with the HTTP client snap?
 
6 REPLIES 6

hmm.. if that's the case, then another option maybe is to store the credentials to an expression file and reference from there in the Http Client Snap. 

Well that's not secure, encrypted storage though - considering an expression file is just a plain-text file.

 

Storing the data in an account actually encrypts the password field ... which i'd consider the minimum requirement for credential storage ...