org.apache.cxf.ws.security.wss4j
Class AbstractTokenInterceptor
java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<SoapMessage>
org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor
org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor
- All Implemented Interfaces:
- SoapInterceptor, Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>
- Direct Known Subclasses:
- BinarySecurityTokenInterceptor, SamlTokenInterceptor, UsernameTokenInterceptor
public abstract class AbstractTokenInterceptor
- extends AbstractSoapInterceptor
An abstract interceptor that can be used to form the basis of an interceptor to add and process
a specific type of security token.
Method Summary |
protected abstract void |
addToken(SoapMessage message)
|
protected boolean |
assertPolicy(AssertionInfoMap aim,
QName name)
|
protected boolean |
assertPolicy(AssertionInfoMap aim,
String localname)
|
protected abstract org.apache.wss4j.policy.model.AbstractToken |
assertTokens(SoapMessage message)
|
protected org.apache.wss4j.policy.model.AbstractToken |
assertTokens(SoapMessage message,
String localname,
boolean signed)
|
protected Header |
findSecurityHeader(SoapMessage message,
boolean create)
|
protected Collection<AssertionInfo> |
getAllAssertionsByLocalname(AssertionInfoMap aim,
String localname)
|
protected CallbackHandler |
getCallback(SoapMessage message)
|
protected String |
getPassword(String userName,
org.apache.wss4j.policy.model.AbstractToken info,
int usage,
SoapMessage message)
|
protected TokenStore |
getTokenStore(SoapMessage message)
|
Set<QName> |
getUnderstoodHeaders()
|
void |
handleMessage(SoapMessage message)
Intercepts a message. |
protected boolean |
isTLSInUse(SoapMessage message)
|
protected void |
policyNotAsserted(org.apache.wss4j.policy.model.AbstractToken assertion,
Exception reason,
SoapMessage message)
|
protected void |
policyNotAsserted(org.apache.wss4j.policy.model.AbstractToken assertion,
String reason,
SoapMessage message)
|
protected abstract void |
processToken(SoapMessage message)
|
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor |
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTokenInterceptor
public AbstractTokenInterceptor()
- Parameters:
p
-
getUnderstoodHeaders
public Set<QName> getUnderstoodHeaders()
- Specified by:
getUnderstoodHeaders
in interface SoapInterceptor
- Overrides:
getUnderstoodHeaders
in class AbstractSoapInterceptor
handleMessage
public void handleMessage(SoapMessage message)
throws Fault
- Description copied from interface:
Interceptor
- Intercepts a message.
Interceptors should NOT invoke handleMessage or handleFault
on the next interceptor - the interceptor chain will
take care of this.
- Throws:
Fault
processToken
protected abstract void processToken(SoapMessage message)
addToken
protected abstract void addToken(SoapMessage message)
assertTokens
protected abstract org.apache.wss4j.policy.model.AbstractToken assertTokens(SoapMessage message)
assertPolicy
protected boolean assertPolicy(AssertionInfoMap aim,
String localname)
assertPolicy
protected boolean assertPolicy(AssertionInfoMap aim,
QName name)
getAllAssertionsByLocalname
protected Collection<AssertionInfo> getAllAssertionsByLocalname(AssertionInfoMap aim,
String localname)
assertTokens
protected org.apache.wss4j.policy.model.AbstractToken assertTokens(SoapMessage message,
String localname,
boolean signed)
isTLSInUse
protected boolean isTLSInUse(SoapMessage message)
getCallback
protected CallbackHandler getCallback(SoapMessage message)
getTokenStore
protected TokenStore getTokenStore(SoapMessage message)
findSecurityHeader
protected Header findSecurityHeader(SoapMessage message,
boolean create)
getPassword
protected String getPassword(String userName,
org.apache.wss4j.policy.model.AbstractToken info,
int usage,
SoapMessage message)
policyNotAsserted
protected void policyNotAsserted(org.apache.wss4j.policy.model.AbstractToken assertion,
String reason,
SoapMessage message)
policyNotAsserted
protected void policyNotAsserted(org.apache.wss4j.policy.model.AbstractToken assertion,
Exception reason,
SoapMessage message)
Apache CXF