I'm setting up APEX REST security by following the instructions from http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/listener-dev-guide-1979546.html#acquiring_an_access_token Everything works great according to document. I can acquire a token, then passing it in the header to get needed data from REST service.
Consumer acquires an token by going on web browser to
https://server:port/apex/resteasy/oauth2/auth?response_type=token&client_id=CLIENT_IDENTIFIER&state=STATE It will be redirected to https://servert:port/apex/restwasy/sign-on?r=oa asking for username and password on browser. Once entering them correctly, it will be directed to Redirect URI defined in the OAuth2 client with the token in the URL.
My question is that is it possible to do token acquiring by coding (like in Salesforce) without going to web browser? We've tried doing that, it will stop due to redirect to sign-on.
Thanks in advance.
Yes it supports the HTTP authentication which basically it will redirect you to a screen where you have to enter username and password. Once done, it will redirect back to the defined URL. The issue we're try to solve is to do all of this via programming - not manually typing username and password.