A Simple Security Service
Here is the
SecurityService class used to authenticate users, and the
IAuthentication
interface it implements.
- The IAuthentication interface contains one login() method
- login() must take an access number and a pin and attempt to
authenticate the user
- If successful, login() returns a UserView. If not, it
throws an InvalidLoginException
- The SecurityService class implements IAuthentication
trivially
- If the security realm is ever switched, the presentation tier does not
have to change