All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mastfrog.acteur.cookie.auth.package.html Maven / Gradle / Ivy

There is a newer version: 2.9.7
Show newest version


    
        Acteur Cookie Auth API
    
    
        

This is an API which makes it trivial to add cookie-based authentication to acteur-based web applications, as opposed to using HTTP basic authentication. Code that was using the @Authenticated (or deprecated @BasicAuth) annotation need not be modified - the new authentication scheme can be used transparently.

To use cookie authentication, the following changes are needed in an application that formerly used HTTP Basic Authentication and the @Authenticated annotation:

  • Add HTTP endpoints for logging in and logging out. The login endpoint should expect a JSON request body containing the fields username and password, and list a LoginActeur in its @Precursors annotation. The logout endpoint should do the same with LogoutActeur.
  • Implement UserFinder and pass the implementation type to the constructor of a CookieAuthModule which should be used by Guice.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy