Code Monkey home page Code Monkey logo

authentication-flows's People

Contributors

bitdeli-chef avatar ggmartins avatar ohadr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

authentication-flows's Issues

support Google AppEngine !

add classes for GAE repo, and Mail Sender to auth-flows. so GAE-apps can use auth-flows package without implementing their own implementations for the above classes.

exception on console, if restore-pass link was tampered with

if the link that the user got to his email was changed, an exception is shown on the browser:

HTTP Status 500 - Request processing failed; nested exception is com.ohadr.crypto.exception.CryptoException: Failed to decrypt URL content adEQ3R5utnfWr2kugM2xQ29u.rm448.ujJZtIspKvbJ

username is case-sensitive

MySQL works fine, but GAE' datastore does not. so the framework should support all cases and take care of this issue - convert all usernames to lowercase

description: 2 users, A@A and a@a should not be allowed.

ActivateAccountEndpoint: target HTML should be a param

the target HTML should be a param. currently it is hard ocded to
LOGIN_FORMS_DIR +"/" + "AccountActivated.htm"

when i wanna run in REST mode, i want the HTML page to be in a different dir (with the controller) so i need it to be parameterized.
'AuthenticationFailureHandler' is doing similar thing - with a param (defaultTargetUrl)

support flow : change password

2 cases: (1) after successful login, when password has expired.
(2) a link "change password" was clicked in the 'hosting' application.

common-crypto does not work on GAE

common-crypto does not work on GAE. because class DefaultCryptoProvider tries to store the key-store, and GAE does not allow that, jar fails to load.

create a better secured resource

the secured resource: instead of print "Hello, world" to the browser in /secured/test, show a page with logout/change-password.

[REST] security bug: after 5 login failures, account locked but user is logged in !!

related to #35 .
the login-fail-handler is good for REST as well, since if no "redirect-uri" is defined, the parent class (SimpleUrlAuthenticationFailureHandler) does not redirect, but sends 401 instead.
However, if account is locked, i have a special treatment here, that DOES redirect. and this is a bug . So there is a need in a flag that indicates whether this is REST call, and if it is, when account is locked, instead of redirection it will return 423 (LOCKED).

GAE: if password expired, redirected to "set new pass" and then get exception

/setNewPassword
java.util.NoSuchElementException: No entity was found matching the key: User("[email protected]")
at com.ohadr.dictionary.gae.GAEAuthenticationAccountRepositoryImpl.changePassword(GAEAuthenticationAccountRepositoryImpl.java:200)
at com.ohadr.auth_flows.core.AuthenticationFlowsProcessorImpl.setPassword(AuthenticationFlowsProcessorImpl.java:270)
at com.ohadr.auth_flows.web.UserActionController.setNewPassword(UserActionController.java:431)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

loadUserByUsername(): use UsernameNotFoundException

JdbcAuthenticationAccountRepositoryImpl.loadUserByUsername(): be Spring-compatible, and use UsernameNotFoundException, and never return null.
need to change also AbstractAuthenticationAccountRepository, to catch this exception.

InMemoryAuthenticationUserImpl.isCredentialsNonExpired() - be Spring!

NOTE and TODO: if i implement this method correctly, then when creds expired the login will fail (bcoz Spring calls this method and then throws CredsExpiredEception). in my flows (not sure it is the right thing), the login is successful and in the successHandler I check if password has expired.

support REST calls (without redirects)

for example, when calling "createAccount", a RESTful does not redirect to another page. Redirecting is MVC behavior; but there are clients (AngularJS) that perform their own MVC architecture, so the auth-flows should support that hence identify REST calls (different URL?) and not redirect, but only return value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.