Package org.eclipse.jetty.util.security
Class Constraint
- java.lang.Object
-
- org.eclipse.jetty.util.security.Constraint
-
- All Implemented Interfaces:
Serializable
,Cloneable
@Deprecated(since="2021-05-27") public class Constraint extends Object implements Cloneable, Serializable
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Constraint Describe an auth and/or data constraint.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
__BASIC_AUTH
Deprecated.static String
__CERT_AUTH
Deprecated.static String
__CERT_AUTH2
Deprecated.static String
__DIGEST_AUTH
Deprecated.static String
__FORM_AUTH
Deprecated.static String
__NEGOTIATE_AUTH
Deprecated.static String
__OPENID_AUTH
Deprecated.static String
__SPNEGO_AUTH
Deprecated.static String
ANY_AUTH
Deprecated.static String
ANY_ROLE
Deprecated.static int
DC_CONFIDENTIAL
Deprecated.static int
DC_FORBIDDEN
Deprecated.static int
DC_INTEGRAL
Deprecated.static int
DC_NONE
Deprecated.static int
DC_UNSET
Deprecated.static String
NONE
Deprecated.
-
Constructor Summary
Constructors Constructor Description Constraint()
Deprecated.Constructor.Constraint(String name, String role)
Deprecated.Convenience Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
clone()
Deprecated.boolean
getAuthenticate()
Deprecated.int
getDataConstraint()
Deprecated.String
getName()
Deprecated.String[]
getRoles()
Deprecated.boolean
hasDataConstraint()
Deprecated.boolean
hasRole(String role)
Deprecated.boolean
isAnyAuth()
Deprecated.Servlet Spec 3.1, pg 140boolean
isAnyRole()
Deprecated.boolean
isForbidden()
Deprecated.void
setAuthenticate(boolean authenticate)
Deprecated.void
setDataConstraint(int c)
Deprecated.void
setName(String name)
Deprecated.void
setRoles(String[] roles)
Deprecated.String
toString()
Deprecated.static boolean
validateMethod(String method)
Deprecated.
-
-
-
Field Detail
-
__BASIC_AUTH
public static final String __BASIC_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__FORM_AUTH
public static final String __FORM_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__DIGEST_AUTH
public static final String __DIGEST_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__CERT_AUTH
public static final String __CERT_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__CERT_AUTH2
public static final String __CERT_AUTH2
Deprecated.- See Also:
- Constant Field Values
-
__SPNEGO_AUTH
public static final String __SPNEGO_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__NEGOTIATE_AUTH
public static final String __NEGOTIATE_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__OPENID_AUTH
public static final String __OPENID_AUTH
Deprecated.- See Also:
- Constant Field Values
-
DC_UNSET
public static final int DC_UNSET
Deprecated.- See Also:
- Constant Field Values
-
DC_NONE
public static final int DC_NONE
Deprecated.- See Also:
- Constant Field Values
-
DC_INTEGRAL
public static final int DC_INTEGRAL
Deprecated.- See Also:
- Constant Field Values
-
DC_CONFIDENTIAL
public static final int DC_CONFIDENTIAL
Deprecated.- See Also:
- Constant Field Values
-
DC_FORBIDDEN
public static final int DC_FORBIDDEN
Deprecated.- See Also:
- Constant Field Values
-
NONE
public static final String NONE
Deprecated.- See Also:
- Constant Field Values
-
ANY_ROLE
public static final String ANY_ROLE
Deprecated.- See Also:
- Constant Field Values
-
ANY_AUTH
public static final String ANY_AUTH
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
validateMethod
public static boolean validateMethod(String method)
Deprecated.
-
clone
public Object clone() throws CloneNotSupportedException
Deprecated.- Throws:
CloneNotSupportedException
-
setName
public void setName(String name)
Deprecated.- Parameters:
name
- the name
-
getName
public String getName()
Deprecated.
-
setRoles
public void setRoles(String[] roles)
Deprecated.
-
isAnyRole
public boolean isAnyRole()
Deprecated.- Returns:
- True if any user role is permitted.
-
isAnyAuth
public boolean isAnyAuth()
Deprecated.Servlet Spec 3.1, pg 140- Returns:
- True if any authenticated user is permitted (ie a role "**" was specified in the constraint).
-
getRoles
public String[] getRoles()
Deprecated.- Returns:
- List of roles for this constraint.
-
hasRole
public boolean hasRole(String role)
Deprecated.- Parameters:
role
- the role- Returns:
- True if the constraint contains the role.
-
setAuthenticate
public void setAuthenticate(boolean authenticate)
Deprecated.- Parameters:
authenticate
- True if users must be authenticated
-
getAuthenticate
public boolean getAuthenticate()
Deprecated.- Returns:
- True if the constraint requires request authentication
-
isForbidden
public boolean isForbidden()
Deprecated.- Returns:
- True if authentication required but no roles set
-
setDataConstraint
public void setDataConstraint(int c)
Deprecated.- Parameters:
c
- Data constrain indicator: 0=DC+NONE, 1=DC_INTEGRAL & 2=DC_CONFIDENTIAL
-
getDataConstraint
public int getDataConstraint()
Deprecated.- Returns:
- Data constrain indicator: 0=DC+NONE, 1=DC_INTEGRAL & 2=DC_CONFIDENTIAL
-
hasDataConstraint
public boolean hasDataConstraint()
Deprecated.- Returns:
- True if a data constraint has been set.
-
-