I have a site developed with wordpress, not on the platform wordpress.com.
Lately I've been testing to use restfull and consume the data via json through the native android app.
I just wish I could authenticate in a safe way using oauth2 with key expiring. I went behind a plugin and found link including the paid version. I happen to be unable to authenticate oauth2 on the client side of the android application.
How do I authenticate oauth2 directly with my website in wordpress, the same way we can do using an api with google, facebook, instagran and others ??
Following the documentation I installed Postman to the browser, where I can see / test what I'm sending and receiving from the server.
I configured the plugin as
Authorization Code: () HTTP redirects and WP login form when authenticating. Client Credentials: () Enable "Client Credentials" Grant Type User Credentials: (x) Enable "User Credentials" Grant Type Refresh Tokens: (x) Enable "Refresh Token" Grant Type Allow Implicit: () Enable "Authorization Code (Implicit)" What is this?
and using postman configurei post www.bancodepeticoes.com?oauth=token
and the fields grant_type password username usuariodowordpress password senhadowordpress
enable x-www-form-undercoled
After receiving
{ "access_token": "7jaux9vehfjmvshfbxubtcqouz1kdv",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "basic",
"refresh_token": "nru6pmkpl5clbavwzk0senihtav7mp"
}
Now how to fill / request new token access with this information.
in the fields
Token Name: -
Auth URL: -
Access Token URL: -
customer id: -
Cliente secret -
Scope (Optional)
Grand type (Client credentials / Authorization code)
I got the basic authentication and I think that later I should upload this access to oauth2 since I do not have all this data before. logging in first with the username and password only.
I get the error
cloud not send request ...
cloud not complete Auth2.0 login ...
Is it possible to use google's api oauth2 for this?
I also tried to access
using the generated token and did not work
Icannotrenewtokenwiththisform.whichurlshouldenterinthefieldsofauthurlandaccesstokenurl????