Class AttributeContext.Auth (2.32.0)

public static final class AttributeContext.Auth extends GeneratedMessageV3 implements AttributeContext.AuthOrBuilder

This message defines request authentication attributes. Terminology is based on the JSON Web Token (JWT) standard, but the terms also correlate to concepts in other standards.

Protobuf type google.rpc.context.AttributeContext.Auth

Static Fields

ACCESS_LEVELS_FIELD_NUMBER

public static final int ACCESS_LEVELS_FIELD_NUMBER
Field Value
TypeDescription
int

AUDIENCES_FIELD_NUMBER

public static final int AUDIENCES_FIELD_NUMBER
Field Value
TypeDescription
int

CLAIMS_FIELD_NUMBER

public static final int CLAIMS_FIELD_NUMBER
Field Value
TypeDescription
int

PRESENTER_FIELD_NUMBER

public static final int PRESENTER_FIELD_NUMBER
Field Value
TypeDescription
int

PRINCIPAL_FIELD_NUMBER

public static final int PRINCIPAL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AttributeContext.Auth getDefaultInstance()
Returns
TypeDescription
AttributeContext.Auth

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AttributeContext.Auth.Builder newBuilder()
Returns
TypeDescription
AttributeContext.Auth.Builder

newBuilder(AttributeContext.Auth prototype)

public static AttributeContext.Auth.Builder newBuilder(AttributeContext.Auth prototype)
Parameter
NameDescription
prototypeAttributeContext.Auth
Returns
TypeDescription
AttributeContext.Auth.Builder

parseDelimitedFrom(InputStream input)

public static AttributeContext.Auth parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AttributeContext.Auth parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AttributeContext.Auth parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AttributeContext.Auth parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AttributeContext.Auth parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AttributeContext.Auth parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AttributeContext.Auth> parser()
Returns
TypeDescription
Parser<Auth>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAccessLevels(int index)

public String getAccessLevels(int index)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"

Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The accessLevels at the given index.

getAccessLevelsBytes(int index)

public ByteString getAccessLevelsBytes(int index)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"

Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the accessLevels at the given index.

getAccessLevelsCount()

public int getAccessLevelsCount()

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"

Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Returns
TypeDescription
int

The count of accessLevels.

getAccessLevelsList()

public ProtocolStringList getAccessLevelsList()

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"

Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the accessLevels.

getAudiences(int index)

public String getAudiences(int index)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The audiences at the given index.

getAudiencesBytes(int index)

public ByteString getAudiencesBytes(int index)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the audiences at the given index.

getAudiencesCount()

public int getAudiencesCount()

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Returns
TypeDescription
int

The count of audiences.

getAudiencesList()

public ProtocolStringList getAudiencesList()

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the audiences.

getClaims()

public Struct getClaims()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT:

{'iss': 'accounts.google.com',
 'sub': '113289723416554971153',
 'aud': ['123456789012', 'pubsub.googleapis.com'],
 'azp': '123456789012.apps.googleusercontent.com',
 'email': 'jsmith&#64;example.com',
 'iat': 1353601026,
 'exp': 1353604926}

SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
Struct

The claims.

getClaimsOrBuilder()

public StructOrBuilder getClaimsOrBuilder()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT:

{'iss': 'accounts.google.com',
 'sub': '113289723416554971153',
 'aud': ['123456789012', 'pubsub.googleapis.com'],
 'azp': '123456789012.apps.googleusercontent.com',
 'email': 'jsmith&#64;example.com',
 'iat': 1353601026,
 'exp': 1353604926}

SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
StructOrBuilder

getDefaultInstanceForType()

public AttributeContext.Auth getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext.Auth

getParserForType()

public Parser<AttributeContext.Auth> getParserForType()
Returns
TypeDescription
Parser<Auth>
Overrides

getPresenter()

public String getPresenter()

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Returns
TypeDescription
String

The presenter.

getPresenterBytes()

public ByteString getPresenterBytes()

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Returns
TypeDescription
ByteString

The bytes for presenter.

getPrincipal()

public String getPrincipal()

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Returns
TypeDescription
String

The principal.

getPrincipalBytes()

public ByteString getPrincipalBytes()

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Returns
TypeDescription
ByteString

The bytes for principal.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasClaims()

public boolean hasClaims()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT:

{'iss': 'accounts.google.com',
 'sub': '113289723416554971153',
 'aud': ['123456789012', 'pubsub.googleapis.com'],
 'azp': '123456789012.apps.googleusercontent.com',
 'email': 'jsmith&#64;example.com',
 'iat': 1353601026,
 'exp': 1353604926}

SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
boolean

Whether the claims field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AttributeContext.Auth.Builder newBuilderForType()
Returns
TypeDescription
AttributeContext.Auth.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AttributeContext.Auth.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AttributeContext.Auth.Builder toBuilder()
Returns
TypeDescription
AttributeContext.Auth.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException