Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let data = {
- grant_type : 'password',
- client_id : 'test-realm',
- username : 'admin',
- password : 'admin'
- };
- let headers = {
- 'Content-Type': 'application/x-www-form-urlencoded'
- };
- axios.post(
- 'https://amritmro.com:8080/auth/realms/master/protocol/openid-connect/token',
- qs.stringify(data),
- headers
- )
- headers = {
- 'Content-Type': 'application/x-www-form-urlencoded',
- 'Authorization': `Bearer ${accessToken}`
- };
- data = {
- rep: {
- email: "test@email.com",
- username: "test@email.com"
- },
- path: 'test-realm'
- };
- axios.post('https://amritmro.com:8080/auth/admin/realms/test-realm/users',
- qs.stringify(data),
- headers
- )
Add Comment
Please, Sign In to add comment