Record Class TokenRequestContext
java.lang.Object
java.lang.Record
io.confluent.kafka.odyssey.auth.TokenRequestContext
- Record Components:
orgResourceId- the organization resource ID (e.g., "org-xxxxx")authenticatedPrincipalCrn- the CRN to use as the authenticated principalprincipalResourceId- the principal resource ID for authorization (e.g., "sa-xxxxx" or "u-xxxxx")targetWorkloadType- the target physical workload type for the token scope
public record TokenRequestContext(String orgResourceId, String authenticatedPrincipalCrn, String principalResourceId, cloud.confluent.cc_auth_dataplane.v2.TargetPhysicalWorkloadType targetWorkloadType)
extends Record
Context required to issue a Logical Access Token from Token Platform.
This record encapsulates all the information needed to request a token. The authenticatedPrincipalCrn should be constructed by the caller using their service-specific CRN format.
-
Constructor Summary
ConstructorsConstructorDescriptionTokenRequestContext(String orgResourceId, String authenticatedPrincipalCrn, String principalResourceId, cloud.confluent.cc_auth_dataplane.v2.TargetPhysicalWorkloadType targetWorkloadType) Creates an instance of aTokenRequestContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthenticatedPrincipalCrnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theorgResourceIdrecord component.Returns the value of theprincipalResourceIdrecord component.cloud.confluent.cc_auth_dataplane.v2.TargetPhysicalWorkloadTypeReturns the value of thetargetWorkloadTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenRequestContext
public TokenRequestContext(String orgResourceId, String authenticatedPrincipalCrn, String principalResourceId, cloud.confluent.cc_auth_dataplane.v2.TargetPhysicalWorkloadType targetWorkloadType) Creates an instance of aTokenRequestContextrecord class.- Parameters:
orgResourceId- the value for theorgResourceIdrecord componentauthenticatedPrincipalCrn- the value for theauthenticatedPrincipalCrnrecord componentprincipalResourceId- the value for theprincipalResourceIdrecord componenttargetWorkloadType- the value for thetargetWorkloadTyperecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
orgResourceId
Returns the value of theorgResourceIdrecord component.- Returns:
- the value of the
orgResourceIdrecord component
-
authenticatedPrincipalCrn
Returns the value of theauthenticatedPrincipalCrnrecord component.- Returns:
- the value of the
authenticatedPrincipalCrnrecord component
-
principalResourceId
Returns the value of theprincipalResourceIdrecord component.- Returns:
- the value of the
principalResourceIdrecord component
-
targetWorkloadType
public cloud.confluent.cc_auth_dataplane.v2.TargetPhysicalWorkloadType targetWorkloadType()Returns the value of thetargetWorkloadTyperecord component.- Returns:
- the value of the
targetWorkloadTyperecord component
-