UNPKG

n8n-nodes-arubacentral

Version:

n8n community node for Aruba Central API integration with comprehensive monitoring, configuration, and management capabilities

128 lines (127 loc) 4.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArubaCentralOAuth2Api = void 0; // credentials/ArubaCentralOAuth2Api.credentials.ts class ArubaCentralOAuth2Api { constructor() { this.name = 'ArubaCentralOAuth2Api'; this.displayName = 'Aruba Central OAuth2 API'; this.documentationUrl = 'arubacentral'; // These properties are essential for proper token storage in n8n // We're keeping our custom flow but declaring we store tokens like OAuth2 this.__defaults = { tokenType: 'Bearer', tokenExpiredStatusCode: 401, tokenPropertyName: 'access_token', }; this.properties = [ { displayName: 'Base URL', name: 'baseUrl', type: 'string', default: '', placeholder: 'https://apigw-prod2.central.arubanetworks.com', required: true, description: 'The domain base URL for HPE Aruba Networking Central API Gateway.', }, { displayName: 'Authentication Method', name: 'authMethod', type: 'options', options: [ { name: 'OAuth2 (Username / Password)', value: 'oauth2', }, { name: 'Bearer Token', value: 'bearerToken', }, ], default: 'oauth2', description: 'Authentication method to use when connecting to Aruba Central.', }, // ── OAuth2 fields ────────────────────────────────────────────────────── { displayName: 'Client ID', name: 'clientId', type: 'string', default: '', description: 'The OAuth client ID from API Gateway.', displayOptions: { show: { authMethod: ['oauth2'], }, }, }, { displayName: 'Client Secret', name: 'clientSecret', type: 'string', default: '', description: 'The OAuth client secret from API Gateway.', displayOptions: { show: { authMethod: ['oauth2'], }, }, }, { displayName: 'Username', name: 'username', type: 'string', default: '', description: 'Username for HPE Aruba Networking Central.', displayOptions: { show: { authMethod: ['oauth2'], }, }, }, { displayName: 'Password', name: 'password', type: 'string', typeOptions: { password: true, }, default: '', description: 'Password for HPE Aruba Networking Central.', displayOptions: { show: { authMethod: ['oauth2'], }, }, }, { displayName: 'Customer ID', name: 'customerId', type: 'string', default: '', description: 'HPE Aruba Networking Central Customer ID.', displayOptions: { show: { authMethod: ['oauth2'], }, }, }, // ── Bearer Token fields ──────────────────────────────────────────────── { displayName: 'Bearer Token', name: 'bearerToken', type: 'string', typeOptions: { password: true, }, default: '', description: 'Static Bearer token for Aruba Central API authentication.', displayOptions: { show: { authMethod: ['bearerToken'], }, }, }, ]; } } exports.ArubaCentralOAuth2Api = ArubaCentralOAuth2Api;