Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Jul 12, 2024
1 parent 778d1a3 commit 7833a53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FleetbaseAuthPlugin {
this.logger.debug({ pkg }, 'Auth::allow_access() - Package: @{pkg}');
try {
const response = await this.fleetbaseClient.post('auth/check-access', { identity: user.name });
this.logger.debug({ response }, 'Auth::allow_access() - Response from Fleetbase: @{response}');
this.logger.debug({ response: response.data }, 'Auth::allow_access() - Response from Fleetbase: @{response}');
const { allowed } = response.data;
this.logger.debug({ allowed }, 'Auth::allow_access() - Allowed: @{allowed}');
callback(null, allowed);
Expand All @@ -76,7 +76,7 @@ class FleetbaseAuthPlugin {
this.logger.debug({ pkg }, 'Auth::allow_publish() - Package: @{pkg}');
try {
const response = await this.fleetbaseClient.post('auth/check-publish', { identity: user.name, package: pkg.name });
this.logger.debug({ response }, 'Auth::allow_publish() - Response from Fleetbase: @{response}');
this.logger.debug({ response: response.data }, 'Auth::allow_publish() - Response from Fleetbase: @{response}');
const { allowed } = response.data;
this.logger.debug({ allowed }, 'Auth::allow_publish() - Allowed: @{allowed}');
callback(null, allowed);
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class FleetbaseAuthPlugin implements IPluginAuth<Config> {
this.logger.debug({ pkg }, 'Auth::allow_access() - Package: @{pkg}');
try {
const response = await this.fleetbaseClient.post('auth/check-access', { identity: user.name });
this.logger.debug({ response }, 'Auth::allow_access() - Response from Fleetbase: @{response}');
this.logger.debug({ response: response.data }, 'Auth::allow_access() - Response from Fleetbase: @{response}');
const { allowed } = response.data;
this.logger.debug({ allowed }, 'Auth::allow_access() - Allowed: @{allowed}');

Expand All @@ -89,7 +89,7 @@ export default class FleetbaseAuthPlugin implements IPluginAuth<Config> {
this.logger.debug({ pkg }, 'Auth::allow_publish() - Package: @{pkg}');
try {
const response = await this.fleetbaseClient.post('auth/check-publish', { identity: user.name, package: pkg.name });
this.logger.debug({ response }, 'Auth::allow_publish() - Response from Fleetbase: @{response}');
this.logger.debug({ response: response.data }, 'Auth::allow_publish() - Response from Fleetbase: @{response}');
const { allowed } = response.data;
this.logger.debug({ allowed }, 'Auth::allow_publish() - Allowed: @{allowed}');

Expand Down

0 comments on commit 7833a53

Please sign in to comment.