Skip to content

Commit

Permalink
feat: added piiLoggingEnabled and logLevel to optional params for cli…
Browse files Browse the repository at this point in the history
…entCredential authentication
  • Loading branch information
sksadjad committed Jun 22, 2022
1 parent e21bd70 commit 584fb7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export async function ClientCredentialAuthenticator(authenticationArgs: IMsAuthe
},
system: {
loggerOptions: {
piiLoggingEnabled: false,
logLevel: LogLevel.Verbose,
piiLoggingEnabled: authenticationArgs.piiLoggingEnabled? authenticationArgs.piiLoggingEnabled: false,
logLevel: authenticationArgs.logLevel? authenticationArgs.logLevel: LogLevel.Verbose,
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions packages/ms-authenticator/src/types/IMsAuthenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ import { IAgentContext } from '@veramo/core'
* authority: optional. if not provided, we'll use the azClientId to create the Tenanted format if provided should be one of these two formats:
* - Tenanted: https://login.microsoftonline.com/{tenant}/, where {tenant} is either the GUID representing the tenant ID or a domain name associated with the tenant.
* - Work and school accounts: https://login.microsoftonline.com/organizations/.
* region?: if present will use the provided, if not will make a request to determine the region
* scopes?: scopes that you want to access via this authentication
* skipCache?: whether to skip cache
* piiLoggingEnabled?: if not provided defaults to false
* logLevel?: can be one of these values:
* Error = 0,
* Warning = 1,
* Info = 2,
* Verbose = 3,
* Trace = 4
* if not provided defaults to LogLevel.Verbose
*/
export interface IMsAuthenticationClientCredentialArgs {
azClientId: string
Expand All @@ -21,6 +30,8 @@ export interface IMsAuthenticationClientCredentialArgs {
region?: string
scopes?: string[]
skipCache?: boolean
piiLoggingEnabled?: boolean
logLevel?: string
}

/**
Expand Down

0 comments on commit 584fb7b

Please sign in to comment.