public class RemoteInvocationSecurityDetectorImpl extends AbstractComponent implements RemoteInvocationSecurityDetector
RemoteInvocationSecurityDetector.LOGIN_COMMAND_NAME, LOGIN_METHOD_NAME| Constructor and Description |
|---|
RemoteInvocationSecurityDetectorImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLogin(AnnotatedElement operation)
Determines if a
RemoteInvocationCall represents the login operation. |
protected boolean |
isLoginByName(AnnotatedElement operation)
Checks for
isLogin(AnnotatedElement) by naming convention. |
boolean |
isSecured(AnnotatedElement operation)
Determines if a
RemoteInvocationCall is secured. |
protected Boolean |
isSecured(Annotation annotation) |
protected boolean |
isSecuredByDefault()
This method gets the default value for
isSecured(AnnotatedElement) if no annotation or other
hint was found. |
doInitialize, doInitialized, getInitializationState, initializepublic RemoteInvocationSecurityDetectorImpl()
public boolean isSecured(AnnotatedElement operation)
RemoteInvocationCall is secured. Here secured
means that it can not be invoked before the login operation has been
invoked and a CsrfToken has been
generated. RemoteInvocationCall will be considered as secured if annotated with
security.RolesAllowed and will not be secured if annotated with
security.PermitAll.isSecured in interface RemoteInvocationSecurityDetectoroperation - is the AnnotatedElement to check. In case of a
RemoteInvocationCommand this will be the command class, in
case of a RemoteInvocationService operation this will be the
Method.true if secured, false otherwise (no security required).protected boolean isSecuredByDefault()
isSecured(AnnotatedElement) if no annotation or other
hint was found. This implementation returns true. Override to change.isSecured(AnnotatedElement).protected Boolean isSecured(Annotation annotation)
annotation - is the Annotation to check.true if secured, false if unsecured and
null if the given annotation is not known to be related to security.public boolean isLogin(AnnotatedElement operation)
RemoteInvocationCall represents the login operation. It is
technically possible to have multiple login operations. However, for simplicity this should be avoided if
possible. A regular implementation should honor the Login annotation as
well as conventions such as a RemoteInvocationSecurityDetector.LOGIN_METHOD_NAME and RemoteInvocationSecurityDetector.LOGIN_COMMAND_NAME.isLogin in interface RemoteInvocationSecurityDetectoroperation - is the AnnotatedElement to check. In case of a
RemoteInvocationCommand this will be the command class, in
case of a RemoteInvocationService operation this will be the
Method.true if the given command represents the login operation,
false otherwise.protected boolean isLoginByName(AnnotatedElement operation)
isLogin(AnnotatedElement) by naming convention.operation - - see isLogin(AnnotatedElement).true if the given operation is a login operation due to naming
convention, false otherwise.RemoteInvocationSecurityDetector.LOGIN_METHOD_NAME,
RemoteInvocationSecurityDetector.LOGIN_COMMAND_NAMECopyright © 2001–2016 mmm-Team. All rights reserved.