Skip to content

Instantly share code, notes, and snippets.

@TarekNajem04
Created October 10, 2020 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TarekNajem04/3da2d50ccf7abc18be844cc6107a8c09 to your computer and use it in GitHub Desktop.
Save TarekNajem04/3da2d50ccf7abc18be844cc6107a8c09 to your computer and use it in GitHub Desktop.
// Warning
{
"kind": 1,
"kindName": "Warning",
"result": {
"userName": "Warning user"
},
"warningDescription": "For more than ten months you have not changed your password, we recommend that you change it as soon as possible."
}
// Success
{
"kind": 0,
"kindName": "Success",
"result": {
"userName": "Valid user"
}
}
// blocked User
{
"kind": 2,
"kindName": "Exception",
"exceptionDescriptions": {
"statusCode": 403,
"status": "Forbidden",
"title": "Authenticate",
"detail": "User user_c is currently blocked.",
"targetSite": "ServiceResult.AspectOriented.LoginService.Authenticate",
"stackTrace": [
" at ServiceResult.AspectOriented.LoginService.Authenticate(String userName, String pw) in C:\\My Projects\\ServiceResult\\src\\ServiceResult.AspectOriented\\LoginService.cs:line 20"
],
"innerException": null
}
}
// Bad Request
{
"kind": 2,
"kindName": "Exception",
"exceptionDescriptions": {
"statusCode": 400,
"status": "BadRequest",
"title": "Authenticate",
"detail": "The username or password you entered is incorrect.",
"targetSite": "ServiceResult.AspectOriented.LoginService.Authenticate",
"stackTrace": [
" at ServiceResult.AspectOriented.LoginService.Authenticate(String userName, String pw) in C:\\My Projects\\ServiceResult\\src\\ServiceResult.AspectOriented\\LoginService.cs:line 66"
],
"innerException": null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment