Package net.shibboleth.idp.ui.csrf.impl

# Class DefaultViewRequiresCSRFTokenPredicate

java.lang.Object
net.shibboleth.idp.ui.csrf.BaseCSRFTokenPredicate
net.shibboleth.idp.ui.csrf.impl.DefaultViewRequiresCSRFTokenPredicate

All Implemented Interfaces:
  `Predicate<RequestContext>`

public class DefaultViewRequiresCSRFTokenPredicate extends BaseCSRFTokenPredicate implements Predicate<RequestContext>

Default `Predicate` for determining if a CSRF token is required for the given request context. Guaranteed to be in a view-state when tested by the `CSRFTokenFlowExecutionListener`.

Returns true if the view-state requires a CSRF token. More specifically, returns true iff the state definition does not contain a `"csrf_excluded"` metadata attribute with a value of `true`.

## Field Summary

### Fields inherited from class net.shibboleth.idp.ui.csrf.BaseCSRFTokenPredicate

`CSRF_EXCLUDED_ATTRIBUTE_NAME`

## Constructor Summary

Constructors
Constructor
Description
`DefaultViewRequiresCSRFTokenPredicate()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`test(RequestContext context)`

### Methods inherited from class net.shibboleth.idp.ui.csrf.BaseCSRFTokenPredicate

`safeGetBooleanStateAttribute`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Constructor Details

### DefaultViewRequiresCSRFTokenPredicate

public DefaultViewRequiresCSRFTokenPredicate()

## Method Details

### test

public boolean test(@Nullable RequestContext context)

Specified by:
  `test` in interface `Predicate<RequestContext>`