Comments (6)
I assume the user can catch the exception and do add the needful messages via Aura.Intl or add to Aura.Filter or some other way.
from aura.auth.
It is partially an I18N issue, yes. The idea is that the package should only throw the exception, and the end-user (developer) can do whatever is needed with the exception.
Hope that makes sense.
from aura.auth.
Adding a message doesn't stop the developer from doing anything at all with the exception. What it does do though, is prevent a generic catch-all exception catch. Rather than just output the message, I have to catch every possible type of exception, then act accordingly.
It's certainly not the end of the world, but I think it does affect the usability of the library.
from aura.auth.
@quasipickle if I understand you,
You are looking to add some message on throwing an exception?
throw new Exception\PasswordIncorrect('Password is incorrect.');
that way you can use
try {
// auth stuffs
} catch (Exception $e) {
echo $e->getMessage();
}
I don't have any trouble to add a generic message, send a PR if you like or ask Paul if this is what you are looking for.
Thanks
from aura.auth.
ask Paul in the sense before you send the PR whether he likes the approach or not.
from aura.auth.
@harikt You understand correctly.
@pmjones How does this sound?
from aura.auth.
Related Issues (20)
- 4.0.0 Release? HOT 2
- PHP 7.4 compatibility HOT 3
- Add ldap bind user HOT 13
- Release and without fear to use HOT 1
- Auth object calling session_start HOT 1
- Rehash HOT 2
- Does HtpasswordVerifier need to verify the password hash is buggy and using bcrypt ? HOT 1
- Better ways to handle brute force attack
- Sessions, remember me functionality and other things. HOT 1
- Can't use minimum-stability: stable with this package HOT 2
- Adapter in resume HOT 1
- Probably good to have messages passed for Exceptions ? HOT 3
- LdapAdapter::bind performs a double unbind on the underlying ldap resource HOT 2
- Default timeout values HOT 3
- Missing return values, or changed API and docblock out of date? HOT 4
- Aura.Session compatibility HOT 12
- Unable to logout HOT 1
- If password changes, session is still valid. HOT 4
- New release builds, please? HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aura.auth.