|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.realm.RealmBase org.apache.catalina.realm.JAASRealm org.apache.geronimo.tomcat.realm.TomcatGeronimoRealm
public class TomcatGeronimoRealm
Field Summary | |
---|---|
protected static String |
info
Descriptive information about this Realm implementation. |
protected static String |
name
Descriptive information about this Realm implementation. |
Fields inherited from class org.apache.catalina.realm.JAASRealm |
---|
appName, roleClasses, roleClassNames, sm, useContextClassLoader, userClasses, userClassNames |
Fields inherited from class org.apache.catalina.realm.RealmBase |
---|
container, containerLog, controller, digest, digestEncoding, domain, host, initialized, lifecycle, md, md5Encoder, md5Helper, mserver, oname, path, started, support, type, validate |
Fields inherited from interface org.apache.catalina.Lifecycle |
---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
---|---|
TomcatGeronimoRealm()
|
Method Summary | |
---|---|
Principal |
authenticate(CallbackHandler callbackHandler,
String principalName)
|
Principal |
authenticate(String username,
String credentials)
Return the Principal associated with the specified
username and credentials, if there is one; otherwise return
null . |
Principal |
authenticate(X509Certificate[] certs)
|
boolean |
hasResourcePermission(org.apache.catalina.connector.Request request,
org.apache.catalina.connector.Response response,
org.apache.catalina.deploy.SecurityConstraint[] constraints,
org.apache.catalina.Context context)
Perform access control based on the specified authorization constraint. |
boolean |
hasRole(Principal principal,
String role)
Return true if the specified Principal has the specified
security role, within the context of this Realm; otherwise return
false . |
boolean |
hasUserDataPermission(org.apache.catalina.connector.Request request,
org.apache.catalina.connector.Response response,
org.apache.catalina.deploy.SecurityConstraint[] constraints)
Enforce any user data constraint required by the security constraint guarding this request URI. |
static String |
setRequestWrapperName(String requestWrapperName)
|
void |
start()
Prepare for active use of the public methods of this Component . |
void |
stop()
Gracefully shut down active use of the public methods of this Component . |
Methods inherited from class org.apache.catalina.realm.JAASRealm |
---|
createPrincipal, getAppName, getName, getPassword, getPrincipal, getRoleClassNames, getUserClassNames, isUseContextClassLoader, makeLegalForJAAS, setAppName, setContainer, setRoleClassNames, setUseContextClassLoader, setUserClassNames |
Methods inherited from class org.apache.catalina.realm.RealmBase |
---|
addLifecycleListener, addPropertyChangeListener, authenticate, authenticate, backgroundProcess, destroy, digest, Digest, findLifecycleListeners, findSecurityConstraints, getContainer, getController, getDigest, getDigest, getDigestEncoding, getDomain, getInfo, getObjectName, getType, getValidate, hasMessageDigest, init, main, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removePropertyChangeListener, setController, setDigest, setDigestEncoding, setValidate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String info
Realm
implementation.
protected static final String name
Realm
implementation.
Constructor Detail |
---|
public TomcatGeronimoRealm()
Method Detail |
---|
public static String setRequestWrapperName(String requestWrapperName)
public boolean hasUserDataPermission(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.deploy.SecurityConstraint[] constraints) throws IOException
true
if this constraint
was not violated and processing should continue, or false
if we have created a response already.
hasUserDataPermission
in interface org.apache.catalina.Realm
hasUserDataPermission
in class org.apache.catalina.realm.RealmBase
request
- Request we are processingresponse
- Response we are creatingconstraints
- Security constraint being checked
IOException
- if an input/output error occurspublic boolean hasResourcePermission(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.deploy.SecurityConstraint[] constraints, org.apache.catalina.Context context) throws IOException
true
if this constraint is satisfied and processing
should continue, or false
otherwise.
hasResourcePermission
in interface org.apache.catalina.Realm
hasResourcePermission
in class org.apache.catalina.realm.RealmBase
request
- Request we are processingresponse
- Response we are creatingconstraints
- Security constraints we are enforcingcontext
- The Context to which client of this class is attached.
IOException
- if an input/output error occurspublic boolean hasRole(Principal principal, String role)
true
if the specified Principal has the specified
security role, within the context of this Realm; otherwise return
false
.
hasRole
in interface org.apache.catalina.Realm
hasRole
in class org.apache.catalina.realm.RealmBase
principal
- Principal for whom the role is to be checkedrole
- Security role to be checkedpublic Principal authenticate(String username, String credentials)
Principal
associated with the specified
username and credentials, if there is one; otherwise return
null
.
If there are any errors with the JDBC connection, executing the query or
anything we return null (don't authenticate). This event is also logged,
and the connection will be closed so that a subsequent request will
automatically re-open it.
authenticate
in interface org.apache.catalina.Realm
authenticate
in class org.apache.catalina.realm.JAASRealm
username
- Username of the Principal
to look upcredentials
- Password or other credentials to use in authenticating this
usernamepublic Principal authenticate(X509Certificate[] certs)
authenticate
in interface org.apache.catalina.Realm
authenticate
in class org.apache.catalina.realm.RealmBase
public Principal authenticate(CallbackHandler callbackHandler, String principalName)
public void start() throws org.apache.catalina.LifecycleException
Component
.
start
in interface org.apache.catalina.Lifecycle
start
in class org.apache.catalina.realm.JAASRealm
org.apache.catalina.LifecycleException
- if this component detects a fatal error
that prevents it from being startedpublic void stop() throws org.apache.catalina.LifecycleException
Component
.
stop
in interface org.apache.catalina.Lifecycle
stop
in class org.apache.catalina.realm.JAASRealm
org.apache.catalina.LifecycleException
- if this component detects a fatal error
that needs to be reported
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |