SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 368 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let data = {
  2.     grant_type : 'password',
  3.     client_id : 'test-realm',
  4.     username : 'admin',
  5.     password : 'admin'
  6. };
  7. let headers = {
  8.     'Content-Type': 'application/x-www-form-urlencoded'
  9. };
  10. axios.post(
  11.     'https://amritmro.com:8080/auth/realms/master/protocol/openid-connect/token',
  12.     qs.stringify(data),
  13.     headers
  14. )
  15.    
  16. headers = {
  17.     'Content-Type': 'application/x-www-form-urlencoded',
  18.     'Authorization': `Bearer ${accessToken}`
  19. };
  20. data = {
  21.     rep: {
  22.         email: "test@email.com",
  23.         username: "test@email.com"
  24.     },
  25.     path: 'test-realm'
  26. };
  27. axios.post('https://amritmro.com:8080/auth/admin/realms/test-realm/users',
  28.     qs.stringify(data),
  29.     headers
  30. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top