public class OAuth2ExpressionParser extends Object implements org.springframework.expression.ExpressionParser
A custom ExpressionParser
that automatically wraps SpEL expression with
OAuth2SecurityExpressionMethods.throwOnError(boolean)
. This makes it simple for users to specify an
expression and then have it verified (providing errors) after the result of the expression is known.
Note: The implication is that all expressions that are parsed must return a boolean result. This expectation is already true since Spring Security expects the result to be a boolean.
Constructor and Description |
---|
OAuth2ExpressionParser(org.springframework.expression.ExpressionParser delegate) |
Modifier and Type | Method and Description |
---|---|
org.springframework.expression.Expression |
parseExpression(String expressionString) |
org.springframework.expression.Expression |
parseExpression(String expressionString,
org.springframework.expression.ParserContext context) |
public OAuth2ExpressionParser(org.springframework.expression.ExpressionParser delegate)
public org.springframework.expression.Expression parseExpression(String expressionString) throws org.springframework.expression.ParseException
parseExpression
in interface org.springframework.expression.ExpressionParser
org.springframework.expression.ParseException
public org.springframework.expression.Expression parseExpression(String expressionString, org.springframework.expression.ParserContext context) throws org.springframework.expression.ParseException
parseExpression
in interface org.springframework.expression.ExpressionParser
org.springframework.expression.ParseException
Copyright © 2019. All rights reserved.