Skip to content

Commit

Permalink
comments on the public API
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant authored Oct 6, 2021
1 parent f6adee0 commit 21011b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
25 changes: 11 additions & 14 deletions sdk/identity/identity/review/identity.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export class AuthenticationRequiredError extends Error {

// @public
export interface AuthenticationRequiredErrorOptions {
// (undocumented)
getTokenOptions?: GetTokenOptions;
// (undocumented)
message?: string;
}

Expand All @@ -72,7 +70,7 @@ export class AuthorizationCodeCredential implements TokenCredential {
constructor(tenantId: string | "common", clientId: string, clientSecret: string, authorizationCode: string, redirectUri: string, options?: TokenCredentialOptions);
constructor(tenantId: string | "common", clientId: string, authorizationCode: string, redirectUri: string, options?: TokenCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export enum AzureAuthorityHosts {
Expand All @@ -86,7 +84,7 @@ export enum AzureAuthorityHosts {
export class AzureCliCredential implements TokenCredential {
constructor(options?: AzureCliCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface AzureCliCredentialOptions extends TokenCredentialOptions {
Expand All @@ -97,7 +95,7 @@ export interface AzureCliCredentialOptions extends TokenCredentialOptions {
export class AzurePowerShellCredential implements TokenCredential {
constructor(options?: AzurePowerShellCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface AzurePowerShellCredentialOptions extends TokenCredentialOptions {
Expand All @@ -118,7 +116,7 @@ export class ChainedTokenCredential implements TokenCredential {
export class ClientCertificateCredential implements TokenCredential {
constructor(tenantId: string, clientId: string, certificatePath: string, options?: ClientCertificateCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface ClientCertificateCredentialOptions extends TokenCredentialOptions, CredentialPersistenceOptions {
Expand All @@ -129,7 +127,7 @@ export interface ClientCertificateCredentialOptions extends TokenCredentialOptio
export class ClientSecretCredential implements TokenCredential {
constructor(tenantId: string, clientId: string, clientSecret: string, options?: ClientSecretCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface ClientSecretCredentialOptions extends TokenCredentialOptions, CredentialPersistenceOptions {
Expand Down Expand Up @@ -167,7 +165,7 @@ export class DeviceCodeCredential implements TokenCredential {
constructor(options?: DeviceCodeCredentialOptions);
authenticate(scopes: string | string[], options?: GetTokenOptions): Promise<AuthenticationRecord | undefined>;
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface DeviceCodeCredentialOptions extends InteractiveCredentialOptions, CredentialPersistenceOptions {
Expand Down Expand Up @@ -219,7 +217,7 @@ export class InteractiveBrowserCredential implements TokenCredential {
constructor(options?: InteractiveBrowserCredentialOptions | InteractiveBrowserCredentialBrowserOptions);
authenticate(scopes: string | string[], options?: GetTokenOptions): Promise<AuthenticationRecord | undefined>;
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface InteractiveBrowserCredentialBrowserOptions extends InteractiveCredentialOptions {
Expand Down Expand Up @@ -252,13 +250,13 @@ export class ManagedIdentityCredential implements TokenCredential {
constructor(clientId: string, options?: TokenCredentialOptions);
constructor(options?: TokenCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export class OnBehalfOfCredential implements TokenCredential {
constructor(configuration: OnBehalfOfCredentialSecretConfiguration | OnBehalfOfCredentialCertificateConfiguration, options?: OnBehalfOfCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface OnBehalfOfCredentialCertificateConfiguration {
Expand Down Expand Up @@ -305,7 +303,7 @@ export function useIdentityPlugin(plugin: IdentityPlugin): void;
export class UsernamePasswordCredential implements TokenCredential {
constructor(tenantId: string, clientId: string, username: string, password: string, options?: UsernamePasswordCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface UsernamePasswordCredentialOptions extends TokenCredentialOptions, CredentialPersistenceOptions {
Expand All @@ -315,14 +313,13 @@ export interface UsernamePasswordCredentialOptions extends TokenCredentialOption
export class VisualStudioCodeCredential implements TokenCredential {
constructor(options?: VisualStudioCodeCredentialOptions);
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
}
}

// @public
export interface VisualStudioCodeCredentialOptions extends TokenCredentialOptions {
tenantId?: string;
}


// (No @packageDocumentation comment for this package)

```
8 changes: 7 additions & 1 deletion sdk/identity/identity/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,13 @@ function convertOAuthErrorResponseToErrorResponse(errorBody: OAuthErrorResponse)
* Optional parameters to the {@link AuthenticationRequiredError}
*/
export interface AuthenticationRequiredErrorOptions {
/**
* The options passed to the getToken request.
*/
getTokenOptions?: GetTokenOptions;
/**
* The message of the error.
*/
message?: string;
}

Expand All @@ -198,7 +204,7 @@ export interface AuthenticationRequiredErrorOptions {
*/
export class AuthenticationRequiredError extends Error {
/**
* The options used to configure the getToken request.
* The options passed to the getToken request.
*/
public getTokenOptions?: GetTokenOptions;

Expand Down

0 comments on commit 21011b5

Please sign in to comment.