public class BasicAuthentation extends Object implements de.yourinspiration.jexpresso.MiddlewareHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
USER_DETAILS_ATTR |
| Constructor and Description |
|---|
BasicAuthentation(de.yourinspiration.jexpresso.baseauth.UserDetailsService userDetailsService,
de.yourinspiration.jexpresso.baseauth.PasswordEncoder passwordEncoder)
Constructs a new HTTP Basic Authentiation middleware.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(de.yourinspiration.jexpresso.Request request,
de.yourinspiration.jexpresso.Response response,
de.yourinspiration.jexpresso.Next next) |
void |
securePath(String path,
String authorities,
io.netty.handler.codec.http.HttpMethod... methods)
Provide HTTP Basic Authentication for the given path and methods.
|
public static final String USER_DETAILS_ATTR
public BasicAuthentation(de.yourinspiration.jexpresso.baseauth.UserDetailsService userDetailsService,
de.yourinspiration.jexpresso.baseauth.PasswordEncoder passwordEncoder)
userDetailsService - the user details service to retrieve user credentialspasswordEncoder - the password encoder to check the passwordspublic void securePath(String path, String authorities, io.netty.handler.codec.http.HttpMethod... methods)
path - the path to be securedauthorities - the granted authoritiesmethods - the methods to be securedpublic void handle(de.yourinspiration.jexpresso.Request request,
de.yourinspiration.jexpresso.Response response,
de.yourinspiration.jexpresso.Next next)
handle in interface de.yourinspiration.jexpresso.MiddlewareHandlerCopyright © 2014 Yourinspiration. All rights reserved.