public class AuthenticationTag
extends javax.servlet.jsp.tagext.TagSupport
Tag
implementation that allows convenient access to the current
Authentication
object.Whilst JSPs can access the SecurityContext
directly, this tag
avoids handling null
conditions. The tag also properly accommodates
Authentication.getPrincipal()
, which can either be a String
or a
UserDetails
.
Constructor and Description |
---|
AuthenticationTag() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag() |
String |
getMethodPrefix() |
String |
getOperation() |
protected String |
invokeOperation(Object obj) |
void |
setMethodPrefix(String methodPrefix) |
void |
setOperation(String operation) |
protected void |
validateArguments() |
protected void |
writeMessage(String msg) |
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
public String getMethodPrefix()
public String getOperation()
protected String invokeOperation(Object obj) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public void setMethodPrefix(String methodPrefix)
public void setOperation(String operation)
protected void validateArguments() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected void writeMessage(String msg) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
Copyright © 2015. All rights reserved.