Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Login [/login]
- ### Login User -- DONE [POST]
- + Request (application/json)
- + Headers
- Accept: application/json
- + Attributes
- + cardNumber: `123456` (string, required) - only numeric characters, exactly 6 characters
- + password: `secret` (string, required) - minimum 6 characters
- + Response 200 (application/json)
- {
- "data": {
- "accessToken": "eyJ0eXAiOiJ
- }
- }
- + Response 400 (application/json)
- {
- "errors": {
- "userError": [
- "User doesnt exist for given card number"
- ],
- "credentialsError": [
- "Incorrect card number and password combination"
- ]
- }
- }
- + Response 422 (VALIDATION ERRORS)
- {
- "message": "The given data was invalid.",
- "errors": {
- "cardNumber": [
- "The card number field is required."
- ],
- "password": [
- "The password field is required."
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement