public class RequireAnyAttributeAuthorizer<U extends CommonProfile> extends AbstractRequireAnyAuthorizer<String,U>
RequireAnyAttributeAuthorizer
which checks profile
attributes for the specified element, and optionally
may pattern-check the configured value. In practice, you may
use this authorizer to see if the profile contains attribute X
and optionally, whether X has a value that matches pattern Y.elements
Constructor and Description |
---|
RequireAnyAttributeAuthorizer() |
RequireAnyAttributeAuthorizer(String valueToMatch) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
check(WebContext context,
U profile,
String element)
Check a specific element.
|
static <U extends CommonProfile> |
requireAnyAttribute(String valueToMatch) |
isProfileAuthorized
getElements, isAuthorized, setElements, setElements, setElements
handleError, isAllAuthorized, isAnyAuthorized
public RequireAnyAttributeAuthorizer()
public RequireAnyAttributeAuthorizer(String valueToMatch)
protected boolean check(WebContext context, U profile, String element)
AbstractRequireElementAuthorizer
check
in class AbstractRequireElementAuthorizer<String,U extends CommonProfile>
context
- the web contextprofile
- the profileelement
- the element to checkpublic static <U extends CommonProfile> RequireAnyAttributeAuthorizer<U> requireAnyAttribute(String valueToMatch)
Copyright © 2019. All rights reserved.