UNPKG

ibm-cloud-sdk-core

Version:

Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.

72 lines (34 loc) 954 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [computeBasicAuthHeader](./ibm-cloud-sdk-core.computebasicauthheader.md) ## computeBasicAuthHeader() function Compute and return a Basic Authorization header from a username and password. **Signature:** ```typescript export declare function computeBasicAuthHeader(username: string, password: string): string; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> username </td><td> string </td><td> The username or client id </td></tr> <tr><td> password </td><td> string </td><td> The password or client secret </td></tr> </tbody></table> **Returns:** string a Basic Auth header with format "Basic <encoded-credentials>"