Record Class CatalogSecurityContext
java.lang.Object
java.lang.Record
org.openmetadata.service.security.auth.CatalogSecurityContext
- All Implemented Interfaces:
javax.ws.rs.core.SecurityContext
public record CatalogSecurityContext(Principal principal, String scheme, String authenticationScheme)
extends Record
implements javax.ws.rs.core.SecurityContext
Holds authenticated principal and security context which is passed to the JAX-RS request methods
-
Field Summary
FieldsFields inherited from interface javax.ws.rs.core.SecurityContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
ConstructorsConstructorDescriptionCatalogSecurityContext(Principal principal, String scheme, String authenticationScheme) Creates an instance of aCatalogSecurityContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthenticationSchemerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisSecure()booleanisUserInRole(String role) Returns the value of theprincipalrecord component.scheme()Returns the value of theschemerecord component.toString()Returns a string representation of this record class.
-
Field Details
-
OPENID_AUTH
- See Also:
-
-
Constructor Details
-
CatalogSecurityContext
Creates an instance of aCatalogSecurityContextrecord class.- Parameters:
principal- the value for theprincipalrecord componentscheme- the value for theschemerecord componentauthenticationScheme- the value for theauthenticationSchemerecord component
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfacejavax.ws.rs.core.SecurityContext
-
isUserInRole
- Specified by:
isUserInRolein interfacejavax.ws.rs.core.SecurityContext
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfacejavax.ws.rs.core.SecurityContext
-
getAuthenticationScheme
- Specified by:
getAuthenticationSchemein interfacejavax.ws.rs.core.SecurityContext
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
principal
Returns the value of theprincipalrecord component.- Returns:
- the value of the
principalrecord component
-
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
authenticationScheme
Returns the value of theauthenticationSchemerecord component.- Returns:
- the value of the
authenticationSchemerecord component
-