n8n-nodes-arubaclearpass
Version:
n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management
56 lines (55 loc) • 1.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClearPassOAuth2Api = void 0;
class ClearPassOAuth2Api {
constructor() {
this.name = 'clearPassOAuth2Api';
this.displayName = 'ClearPass OAuth2 API';
this.documentationUrl = 'https://www.arubanetworks.com/products/network-management-operations/clearpass/';
this.extends = ['oAuth2Api'];
this.properties = [
{
displayName: 'URL',
name: 'url',
type: 'string',
default: 'https://clearpass.example.com',
required: true,
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
default: '={{$self.getAuthUrl($credentials)}}',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: '={{$self.getAccessTokenUrl($credentials)}}',
required: true,
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'body',
},
];
}
// Method to dynamically generate the authorization URL
getAuthUrl(credentials) {
return `${credentials.url}/api/oauth`;
}
// Method to dynamically generate the access token URL
getAccessTokenUrl(credentials) {
return `${credentials.url}/api/oauth`;
}
}
exports.ClearPassOAuth2Api = ClearPassOAuth2Api;