|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider
@Service(value=org.apache.felix.webconsole.WebConsoleSecurityProvider.class) public class SlingWebConsoleSecurityProvider
The SlingWebConsoleSecurityProvider
is security provider for the
Apache Felix Web Console which validates the user name and password by loging
into the repository and the checking whether the user is allowed access.
Access granted by the authenticate(String, String)
method applies to
all of the Web Console since the authorize(Object, String)
method
always returns true
.
This security provider requires a JCR Repository to operate. Therefore it is only registered as a security provider service once such a JCR Repository is available.
Constructor Summary | |
---|---|
SlingWebConsoleSecurityProvider()
|
Method Summary | |
---|---|
Object |
authenticate(String userName,
String password)
Authenticates and authorizes the user identified by the user name and password. |
boolean |
authorize(Object user,
String role)
All users authenticated with the repository and being a member of the authorized groups are granted access for all roles in the Web Console. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SlingWebConsoleSecurityProvider()
Method Detail |
---|
public Object authenticate(String userName, String password)
If the user name and password cannot be used to login to the default workspace of the repository or if the user neither one of the configured set of granted users or is not a member of the configured set of groups access is denied to the Web Console.
authenticate
in interface org.apache.felix.webconsole.WebConsoleSecurityProvider
userName
- The name of the user to grant access forpassword
- The password to authenticate the user. This may be
null
to assume an empty password.
userName
is currently returned to indicate
successfull authentication.
NullPointerException
- if userName
is
null
.public boolean authorize(Object user, String role)
authorize
in interface org.apache.felix.webconsole.WebConsoleSecurityProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |