|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.csrf.internal.scripting.CSRFTokenScriptService
@Component(roles=org.xwiki.script.service.ScriptService.class) @Named(value="csrf") @Singleton public class CSRFTokenScriptService
Script service wrapping a CSRFToken component.
| Constructor Summary | |
|---|---|
CSRFTokenScriptService()
|
|
| Method Summary | |
|---|---|
void |
clearToken()
Removes the anti-CSRF token associated with the current user. |
java.lang.String |
getResubmissionURL()
Get the URL where a failed request should be redirected to. |
java.lang.String |
getToken()
Returns the anti-CSRF token associated with the current user. |
boolean |
isTokenValid(java.lang.String token)
Check if the given token matches the internally stored token associated with the current user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSRFTokenScriptService()
| Method Detail |
|---|
public java.lang.String getToken()
getToken in interface CSRFTokenCSRFToken.isTokenValid(String)public void clearToken()
CSRFToken.getToken() will generate a fresh token.
clearToken in interface CSRFTokenCSRFToken.clearToken()public boolean isTokenValid(java.lang.String token)
token matches the internally stored token associated with the current user.
isTokenValid in interface CSRFTokentoken - random token from the request
true if the component is disabled or the given token is correct, false otherwiseCSRFToken.isTokenValid(String)public java.lang.String getResubmissionURL()
getResubmissionURL in interface CSRFTokenCSRFToken.getResubmissionURL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||