public abstract class AbstractBasicHttpAuthenticatorFactory extends Object implements ServletAuthenticatorFactory
Abstract class that makes basic authentication easier to handle by managing the request headers and the base 64 decoding.
Extend this class and implement doAuthenticate and doAuthorize to authenticate and authorize against a specific user store.
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBasicHttpAuthenticatorFactory.BasicHttpAuthenticator
HTTP Basic Authentication
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
basicRealm |
protected String |
guestUserName |
| Constructor and Description |
|---|
AbstractBasicHttpAuthenticatorFactory() |
| Modifier and Type | Method and Description |
|---|---|
Authenticator |
create(WebScriptServletRequest req,
WebScriptServletResponse res)
Factory's create method.
|
abstract boolean |
doAuthenticate(String username,
String password)
Implement to authenticate against a specific user store.
|
abstract boolean |
doAuthorize(String username,
Description.RequiredAuthentication role)
Implement to authorize against a specific user store.
|
void |
setBasicRealm(String basicRealm)
The basic realm.
|
void |
setGuestUserName(String guestUserName)
The guest username.
|
public AbstractBasicHttpAuthenticatorFactory()
public Authenticator create(WebScriptServletRequest req, WebScriptServletResponse res)
create in interface ServletAuthenticatorFactoryreq - The webscript requestres - THe webscript responsepublic abstract boolean doAuthenticate(String username, String password)
username - The usernamepassword - The passwordpublic abstract boolean doAuthorize(String username, Description.RequiredAuthentication role)
username - The usernamerole - The role that the user MUST havepublic void setGuestUserName(String guestUserName)
guestUserName - The guest usernamepublic void setBasicRealm(String basicRealm)
basicRealm - The basic realmCopyright © 2005–2021 Alfresco Software. All rights reserved.