Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Autoryzujesz się jako user o id 1 czyli janek
  2.  
  3. POST
  4. Content-Type: application/json
  5. http://localhost:8080/api/auth
  6. {
  7. "login" : "janek",
  8. "password" : "tajnehaslo"
  9. }
  10.  
  11. W odpowiedzi dostajesz token który zapisujesz sobie gdzieś z boku.
  12. Przy zapytaniu które wymaga autoryzacji dodajesz nagłówek: Authorization: Bearer <token>
  13.  
  14. PRZYKŁAD NAGŁÓWKA: Authorization: Bearer 29ac2176488e653acec6370f5feae84370300712748d3990fd7667f060dacda59d844afa698e887ed329a502816eabf7f6409fd123a6b740160b666fcfcb96968dea520ad38b093e30f7eed8657787e47236db4c005cc05e522918ab832e5d883e4f1cd480f6423637958139f16cebc5517efbccdc5c61fcfdb8af1c02edaa08$5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement