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
AUDIENCES_FIELD_NUMBER
public static final int AUDIENCES_FIELD_NUMBER
Field Value
CLAIMS_FIELD_NUMBER
public static final int CLAIMS_FIELD_NUMBER
Field Value
PRESENTER_FIELD_NUMBER
public static final int PRESENTER_FIELD_NUMBER
Field Value
PRINCIPAL_FIELD_NUMBER
public static final int PRINCIPAL_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AttributeContext.Auth getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AttributeContext.Auth.Builder newBuilder()
Returns
newBuilder(AttributeContext.Auth prototype)
public static AttributeContext.Auth.Builder newBuilder(AttributeContext.Auth prototype)
Parameter
Returns
parseDelimitedFrom(InputStream input)
public static AttributeContext.Auth parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AttributeContext.Auth parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AttributeContext.Auth parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(CodedInputStream input)
public static AttributeContext.Auth parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(InputStream input)
public static AttributeContext.Auth parseFrom(InputStream input)
Parameter
Returns
Exceptions
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AttributeContext.Auth parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext.Auth parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AttributeContext.Auth> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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
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
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@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@example.com',
'iat': 1353601026,
'exp': 1353604926}
SAML assertions are similarly specified, but with an identity provider
dependent structure.
.google.protobuf.Struct claims = 4;
Returns
getDefaultInstanceForType()
public AttributeContext.Auth getDefaultInstanceForType()
Returns
getParserForType()
public Parser<AttributeContext.Auth> getParserForType()
Returns
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
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
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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@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()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AttributeContext.Auth.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AttributeContext.Auth.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AttributeContext.Auth.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions