Send feedback
  
   
 
  
    
      Class AuthRequirement (2.30.0)
    
    
       
    
    
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
      
     
  
  
   
  
    
  
  
    
    
    
  Version 2.30.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   final   class  AuthRequirement   extends   GeneratedMessageV3   implements   AuthRequirementOrBuilder  
   
   User-defined authentication requirements, including support for
 JSON Web Token
 (JWT) .
 Protobuf type google.api.AuthRequirement
 
  
  
  
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int) 
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  AUDIENCES_FIELD_NUMBER 
  
    
public   static   final   int   AUDIENCES_FIELD_NUMBER  
   
  
    
      
        Field Value  
       
      
        Type  
        Description  
       
      
        int  
         
       
     
  
  PROVIDER_ID_FIELD_NUMBER 
  
    
public   static   final   int   PROVIDER_ID_FIELD_NUMBER  
   
  
    
      
        Field Value  
       
      
        Type  
        Description  
       
      
        int  
         
       
     
  
  Static Methods
   
   
  getDefaultInstance() 
  
    
public   static   AuthRequirement   getDefaultInstance ()  
   
  
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
   
  
   
  newBuilder() 
  
    
public   static   AuthRequirement . Builder   newBuilder ()  
   
  
   
  newBuilder(AuthRequirement prototype) 
  
    
public   static   AuthRequirement . Builder   newBuilder ( AuthRequirement   prototype )  
   
  
  
   
  
  
    
public   static   AuthRequirement   parseDelimitedFrom ( InputStream   input )  
   
  
  
  
   
  
  
    
public   static   AuthRequirement   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  parseFrom(byte[] data) 
  
    
public   static   AuthRequirement   parseFrom ( byte []   data )  
   
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        data 
        byte [] 
       
     
  
  
  
   
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   AuthRequirement   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  parseFrom(ByteString data) 
  
    
public   static   AuthRequirement   parseFrom ( ByteString   data )  
   
  
  
  
   
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   AuthRequirement   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  
  
    
public   static   AuthRequirement   parseFrom ( CodedInputStream   input )  
   
  
  
  
   
  
  
    
public   static   AuthRequirement   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  
  
    
public   static   AuthRequirement   parseFrom ( InputStream   input )  
   
  
  
  
   
  
  
    
public   static   AuthRequirement   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  parseFrom(ByteBuffer data) 
  
    
public   static   AuthRequirement   parseFrom ( ByteBuffer   data )  
   
  
  
  
   
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   AuthRequirement   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
   
  
  
  
   
  parser() 
  
    
public   static   Parser<AuthRequirement>   parser ()  
   
  
  Methods
   
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
   
  
    
      
        Parameter  
       
      
        Name  
        Description  
       
      
        obj 
        Object  
       
     
  
  
  Overrides 
  
   
  getAudiences() 
  
    
public   String   getAudiences ()  
   
   NOTE: This will be deprecated soon, once AuthProvider.audiences is
 implemented and accepted in all the runtime components.
 The list of JWT
 audiences .
 that are allowed to access. A JWT containing any of these audiences will
 be accepted. When this setting is absent, only JWTs with audience
 "https://Service_name /API_name "
 will be accepted. For example, if no audiences are in the setting,
 LibraryService API will only accept JWTs with the following audience
 "https://library-example.googleapis.com/google.example.library.v1.LibraryService ".
 Example:
 audiences: bookstore_android.apps.googleusercontent.com,
            bookstore_web.apps.googleusercontent.com
 string audiences = 2;
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        String  
        The audiences.
 
       
     
  
   
  getAudiencesBytes() 
  
    
public   ByteString   getAudiencesBytes ()  
   
   NOTE: This will be deprecated soon, once AuthProvider.audiences is
 implemented and accepted in all the runtime components.
 The list of JWT
 audiences .
 that are allowed to access. A JWT containing any of these audiences will
 be accepted. When this setting is absent, only JWTs with audience
 "https://Service_name /API_name "
 will be accepted. For example, if no audiences are in the setting,
 LibraryService API will only accept JWTs with the following audience
 "https://library-example.googleapis.com/google.example.library.v1.LibraryService ".
 Example:
 audiences: bookstore_android.apps.googleusercontent.com,
            bookstore_web.apps.googleusercontent.com
 string audiences = 2;
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        ByteString  
        The bytes for audiences.
 
       
     
  
   
  getDefaultInstanceForType() 
  
    
public   AuthRequirement   getDefaultInstanceForType ()  
   
  
   
  getParserForType() 
  
    
public   Parser<AuthRequirement>   getParserForType ()  
   
  
  Overrides 
  
   
  getProviderId() 
  
    
public   String   getProviderId ()  
   
   id  from authentication provider.
 Example:
 provider_id: bookstore_auth
 string provider_id = 1;
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        String  
        The providerId.
 
       
     
  
   
  getProviderIdBytes() 
  
    
public   ByteString   getProviderIdBytes ()  
   
   id  from authentication provider.
 Example:
 provider_id: bookstore_auth
 string provider_id = 1;
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        ByteString  
        The bytes for providerId.
 
       
     
  
   
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
   
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        int  
         
       
     
  
  Overrides 
  
   
  hashCode() 
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        int  
         
       
     
  
  Overrides 
  
   
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
   
  
  Overrides 
  
   
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
   
  
  Overrides 
  
   
  newBuilderForType() 
  
    
public   AuthRequirement . Builder   newBuilderForType ()  
   
  
   
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   AuthRequirement . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
   
  
  
  Overrides 
  
   
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
   
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        Object  
         
       
     
  
  Overrides 
  
   
  toBuilder() 
  
    
public   AuthRequirement . Builder   toBuilder ()  
   
  
   
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
   
  
  Overrides 
  
  
 
     
    
  
  
  
     
  
 
  
    
    
      
    
     
  
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]