Package org.eclipse.jetty.util.security
Class Constraint
- java.lang.Object
-
- org.eclipse.jetty.util.security.Constraint
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
@Deprecated(since="2021-05-27") public class Constraint extends java.lang.Object implements java.lang.Cloneable, java.io.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 java.lang.String
__BASIC_AUTH
Deprecated.static java.lang.String
__CERT_AUTH
Deprecated.static java.lang.String
__CERT_AUTH2
Deprecated.static java.lang.String
__DIGEST_AUTH
Deprecated.static java.lang.String
__FORM_AUTH
Deprecated.static java.lang.String
__NEGOTIATE_AUTH
Deprecated.static java.lang.String
__OPENID_AUTH
Deprecated.static java.lang.String
__SPNEGO_AUTH
Deprecated.static java.lang.String
ANY_AUTH
Deprecated.static java.lang.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 java.lang.String
NONE
Deprecated.
-
Constructor Summary
Constructors Constructor Description Constraint()
Deprecated.Constructor.Constraint(java.lang.String name, java.lang.String role)
Deprecated.Convenience Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
Deprecated.boolean
getAuthenticate()
Deprecated.int
getDataConstraint()
Deprecated.java.lang.String
getName()
Deprecated.java.lang.String[]
getRoles()
Deprecated.boolean
hasDataConstraint()
Deprecated.boolean
hasRole(java.lang.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(java.lang.String name)
Deprecated.void
setRoles(java.lang.String[] roles)
Deprecated.java.lang.String
toString()
Deprecated.static boolean
validateMethod(java.lang.String method)
Deprecated.
-
-
-
Field Detail
-
__BASIC_AUTH
public static final java.lang.String __BASIC_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__FORM_AUTH
public static final java.lang.String __FORM_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__DIGEST_AUTH
public static final java.lang.String __DIGEST_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__CERT_AUTH
public static final java.lang.String __CERT_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__CERT_AUTH2
public static final java.lang.String __CERT_AUTH2
Deprecated.- See Also:
- Constant Field Values
-
__SPNEGO_AUTH
public static final java.lang.String __SPNEGO_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__NEGOTIATE_AUTH
public static final java.lang.String __NEGOTIATE_AUTH
Deprecated.- See Also:
- Constant Field Values
-
__OPENID_AUTH
public static final java.lang.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 java.lang.String NONE
Deprecated.- See Also:
- Constant Field Values
-
ANY_ROLE
public static final java.lang.String ANY_ROLE
Deprecated.- See Also:
- Constant Field Values
-
ANY_AUTH
public static final java.lang.String ANY_AUTH
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
validateMethod
public static boolean validateMethod(java.lang.String method)
Deprecated.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Deprecated.- Throws:
java.lang.CloneNotSupportedException
-
setName
public void setName(java.lang.String name)
Deprecated.- Parameters:
name
- the name
-
getName
public java.lang.String getName()
Deprecated.
-
setRoles
public void setRoles(java.lang.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 java.lang.String[] getRoles()
Deprecated.- Returns:
- List of roles for this constraint.
-
hasRole
public boolean hasRole(java.lang.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.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-