From 8bc15f7c81d32b25dbc0cebca3eb1940cedf8b36 Mon Sep 17 00:00:00 2001 From: Sadika Sumanapala Date: Thu, 5 May 2016 23:25:07 +0530 Subject: [PATCH] Update example to throw unauthorized exception on invalid credentials Server expects that credentials provider will always gives an Cretaintails object. Therefore throw unauthorized exception if no matching credeaintils were found. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 23763dc..d616ab3 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,8 @@ $credentialsProvider = function ($id) { '12345' // identifier, default: null ); } + + throw new UnauthorizedException("Unknown credentials"); }; // A complete example