Skip to content

Using Postman for testing

Brutus5000 edited this page Nov 3, 2018 · 8 revisions

OAuth

In order to authenticate with Postman, it needs to be added as an OAuth client first. You can skip this if you loaded the test-data.sql into the database. Otherwise invoke the following sql:

INSERT INTO oauth_clients (id, name, client_secret, client_type, redirect_uris, default_redirect_uri, default_scope)
VALUES
  ('postman', 'postman', '{noop}postman', 'public', 'http://localhost https://www.getpostman.com/oauth2/callback',
   'https://www.getpostman.com/oauth2/callback',
   'upload_map upload_mod read_achievements write_achievements read_events write_events');

Then, get an authentication token:

Token Name: faf-java-api
Grant Type: Authorization Code
Callback URL: http://localhost
Auth URL: http://localhost:8010/oauth/authorize
Access token URL: http://localhost:8010/oauth/token
Client ID: postman
Client Secret: postman
Scope: leave it empty (will use default scope)
State: leave it empty
Client Authentication: Send client credentials in body

Afterwards, make sure you use the token for your requests and refresh it as required.