ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
56 lines (27 loc) • 1.01 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [getAuthenticatorFromEnvironment](./ibm-cloud-sdk-core.getauthenticatorfromenvironment.md)
## getAuthenticatorFromEnvironment() function
Look for external configuration of authenticator.
Try to get authenticator from external sources, with the following priority: 1. Credentials file (ibm-credentials.env) 2. Environment variables 3. VCAP Services (Cloud Foundry)
**Signature:**
```typescript
export declare function getAuthenticatorFromEnvironment(serviceName: string): Authenticator;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
serviceName
</td><td>
string
</td><td>
the service name prefix.
</td></tr>
</tbody></table>
**Returns:**
[Authenticator](./ibm-cloud-sdk-core.authenticator.md)