CredentialFactory
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
|
Public Method Summary
abstract
GoogleCredential
|
|
Public Methods
public
abstract
GoogleCredential
getCredential
(Collection<String> scopes)
Parameters
scopes |
the OAuth 2.0 scope requirements to access the Cloud Search API |
Throws
GeneralSecurityException |
|
IOException |
|
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-03-18 UTC.
[null,null,["Last updated 2025-03-18 UTC."],[],[],null,["# CredentialFactory\n\npublic interface **CredentialFactory** \n\n|---|---|---|\n| Known Indirect Subclasses [LocalFileCredentialFactory](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/LocalFileCredentialFactory) |-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [LocalFileCredentialFactory](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/LocalFileCredentialFactory) | Factory to create a [GoogleCredential](/workspace/cloud-search/docs/reference/sdk/com/google/api/client/googleapis/auth/oauth2/GoogleCredential) object for accessing the Cloud Search API. | |||\n\nFactory to create a [GoogleCredential](/workspace/cloud-search/docs/reference/sdk/com/google/api/client/googleapis/auth/oauth2/GoogleCredential) object for accessing the Cloud Search API. \n\n### Public Method Summary\n\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract GoogleCredential | [getCredential](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/CredentialFactory#getCredential(java.util.Collection\u003cjava.lang.String\u003e))(Collection\\\u003cString\\\u003e scopes) Creates a [GoogleCredential](/workspace/cloud-search/docs/reference/sdk/com/google/api/client/googleapis/auth/oauth2/GoogleCredential) object for accessing the Cloud Search API. |\n\nPublic Methods\n--------------\n\n#### public abstract GoogleCredential\n**getCredential**\n(Collection\\\u003cString\\\u003e scopes)\n\nCreates a [GoogleCredential](/workspace/cloud-search/docs/reference/sdk/com/google/api/client/googleapis/auth/oauth2/GoogleCredential) object for accessing the Cloud Search API. \n\n##### Parameters\n\n| scopes | the OAuth 2.0 scope requirements to access the Cloud Search API |\n|--------|-----------------------------------------------------------------|\n\n##### Returns\n\n- a fully built [GoogleCredential](/workspace/cloud-search/docs/reference/sdk/com/google/api/client/googleapis/auth/oauth2/GoogleCredential) \n\n##### Throws\n\n| GeneralSecurityException | |\n| IOException | |\n|--------------------------|---|"]]