Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
    Builder
    class Builder
    
    A builder for CredentialOption.
    Summary
    
    
    Public constructors
    
      Builder
      
      Builder(
    type: String, 
    credentialRetrievalData: Bundle, 
    candidateQueryData: Bundle)
      
        
          
            | Parameters | 
          
            | type | String: the type of the credential option This value cannot be null. | 
          
            | credentialRetrievalData | Bundle: the full request data This value cannot be null. | 
          
            | candidateQueryData | Bundle: the partial request data that will be sent to the provider during the initial credential candidate query stage. This value cannot be null. | 
        
      
      
        
          
            | Exceptions | 
          
            | java.lang.IllegalArgumentException | If typeis null, or empty | 
          
            | java.lang.NullPointerException | If credentialRetrievalData, orcandidateQueryDatais null | 
        
      
     
    Public methods
    
      addAllowedProvider
      
      fun addAllowedProvider(allowedProvider: ComponentName): CredentialOption.Builder
      Adds a provider ComponentName to be queried while gathering credentials from credential providers on the device. If no candidate providers are specified, all user configured and system credential providers will be queried in the candidate query phase. If an invalid component name is provided, or a service corresponding to the component name does not exist on the device, that component name is ignored. If all component names are invalid, or not present on the device, no providers are queried and no credentials are retrieved.
      
        
          
            | Parameters | 
          
            | allowedProvider | ComponentName: This value cannot be null. | 
        
      
      
      
        
          
            | Exceptions | 
          
            | java.lang.NullPointerException | If allowedProvideris null | 
        
      
     
    
    
      setAllowedProviders
      
      fun setAllowedProviders(allowedProviders: MutableSet<ComponentName!>): CredentialOption.Builder
      Sets a set of provider ComponentName to be queried while gathering credentials from credential providers on the device. If no candidate providers are specified, all user configured and system credential providers will be queried in the candidate query phase. If an invalid component name is provided, or a service corresponding to the component name does not exist on the device, that component name is ignored. If all component names are invalid, or not present on the device, no providers are queried and no credentials are retrieved.
      
      
      
        
          
            | Exceptions | 
          
            | java.lang.NullPointerException | If allowedProvidersis null, or any of its elements are null. | 
        
      
     
    
      setIsSystemProviderRequired
      
      fun setIsSystemProviderRequired(isSystemProviderRequired: Boolean): CredentialOption.Builder
      Sets a true/false value corresponding to whether this option must be serviced by system credentials providers only.
      
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]