0

I'm trying to post to a Salesforce Rest Resource from a java console app. Currently I'm exposing it as a public resource via custom portals. I'm looking for suggestions for a way to implement the authentication without passing username, password. I have checked OAuth flows but I believe all of them require a callback implementation to read the tokens. It will be helpful if you can suggest a way to authorize in an implicit manner.

4

If you want headless, no-interaction authentication, implement the JWT Flow.

You'll authorize with a private key and a username, no password. If you "pre-approve" specific Profiles and/or Permission Sets on the Connected App you build in Salesforce, no user interaction of any kind will be required.

The alternative would be to implement another flow, like Web Server, that provides you with a refresh token; in that situation you'd have a user interaction only once and can then act in headless mode via the refresh token.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.