Class AttributeContext.Auth (2.40.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
Type Description
int

AUDIENCES_FIELD_NUMBER

public static final int AUDIENCES_FIELD_NUMBER
Field Value
Type Description
int

CLAIMS_FIELD_NUMBER

public static final int CLAIMS_FIELD_NUMBER
Field Value
Type Description
int

PRESENTER_FIELD_NUMBER

public static final int PRESENTER_FIELD_NUMBER
Field Value
Type Description
int

PRINCIPAL_FIELD_NUMBER

public static final int PRINCIPAL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AttributeContext.Auth getDefaultInstance()
Returns
Type Description
AttributeContext.Auth

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AttributeContext.Auth.Builder newBuilder()
Returns
Type Description
AttributeContext.Auth.Builder

newBuilder(AttributeContext.Auth prototype)

public static AttributeContext.Auth.Builder newBuilder(AttributeContext.Auth prototype)
Parameter
Name Description
prototype AttributeContext.Auth
Returns
Type Description
AttributeContext.Auth.Builder

parseDelimitedFrom(InputStream input)

public static AttributeContext.Auth parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AttributeContext.Auth parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AttributeContext.Auth parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AttributeContext.Auth parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AttributeContext.Auth parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AttributeContext.Auth parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Auth parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Auth
Exceptions
Type Description
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
StructOrBuilder

getDefaultInstanceForType()

public AttributeContext.Auth getDefaultInstanceForType()
Returns
Type Description
AttributeContext.Auth

getParserForType()

public Parser<AttributeContext.Auth> getParserForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for principal.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
Type Description
boolean

Whether the claims field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AttributeContext.Auth.Builder newBuilderForType()
Returns
Type Description
AttributeContext.Auth.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AttributeContext.Auth.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AttributeContext.Auth.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AttributeContext.Auth.Builder toBuilder()
Returns
Type Description
AttributeContext.Auth.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException