mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: Add support for client credentials with Azure Log monitor (#13038)
This commit is contained in:
parent
21773764d3
commit
2c2d63157b
|
@ -5,7 +5,7 @@ export class MicrosoftAzureMonitorOAuth2Api implements ICredentialType {
|
||||||
|
|
||||||
displayName = 'Microsoft Azure Monitor OAuth2 API';
|
displayName = 'Microsoft Azure Monitor OAuth2 API';
|
||||||
|
|
||||||
extends = ['microsoftOAuth2Api'];
|
extends = ['oAuth2Api'];
|
||||||
|
|
||||||
documentationUrl = 'microsoftazuremonitor';
|
documentationUrl = 'microsoftazuremonitor';
|
||||||
|
|
||||||
|
@ -18,6 +18,22 @@ export class MicrosoftAzureMonitorOAuth2Api implements ICredentialType {
|
||||||
};
|
};
|
||||||
|
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Authorization Code',
|
||||||
|
value: 'authorizationCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Client Credentials',
|
||||||
|
value: 'clientCredentials',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Tenant ID',
|
displayName: 'Tenant ID',
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -59,19 +75,28 @@ export class MicrosoftAzureMonitorOAuth2Api implements ICredentialType {
|
||||||
displayName: 'Access Token URL',
|
displayName: 'Access Token URL',
|
||||||
name: 'accessTokenUrl',
|
name: 'accessTokenUrl',
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: '=https://login.microsoftonline.com/{{$self["tenantId"]}}/oauth2/token',
|
default:
|
||||||
|
'=https://login.microsoftonline.com/{{$self["tenantId"]}}/oauth2/{{$self["grantType"] === "clientCredentials" ? "v2.0/" : ""}}token',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Auth URI Query Parameters',
|
displayName: 'Auth URI Query Parameters',
|
||||||
name: 'authQueryParameters',
|
name: 'authQueryParameters',
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: '=resource={{$self["resource"]}}',
|
default:
|
||||||
|
'={{$self["grantType"] === "clientCredentials" ? "" : "resource=" + $self["resource"]}}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Scope',
|
displayName: 'Scope',
|
||||||
name: 'scope',
|
name: 'scope',
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: '',
|
default:
|
||||||
|
'={{$self["grantType"] === "clientCredentials" ? $self["resource"] + "/.default" : ""}}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Authentication',
|
||||||
|
name: 'authentication',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'body',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue