Skip to content

Commit

Permalink
use arrow functions instead of bind
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthMantri committed Jul 2, 2024
1 parent df6e945 commit 1faeaa4
Showing 1 changed file with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,14 @@ export class CoreSecurityRouteHandlerContext implements SecurityRequestHandlerCo
this.#authc = {
getCurrentUser: () => this.securityStart.authc.getCurrentUser(this.request),
apiKeys: {
areAPIKeysEnabled: this.securityStart.authc.apiKeys.areAPIKeysEnabled.bind(
this.securityStart.authc.apiKeys
),
create: this.securityStart.authc.apiKeys.create.bind(
this.securityStart.authc.apiKeys,
this.request
),
update: this.securityStart.authc.apiKeys.update.bind(
this.securityStart.authc.apiKeys,
this.request
),
validate: this.securityStart.authc.apiKeys.validate.bind(
this.securityStart.authc.apiKeys
),
invalidate: this.securityStart.authc.apiKeys.invalidate.bind(
this.securityStart.authc.apiKeys,
this.request
),
areAPIKeysEnabled: () => this.securityStart.authc.apiKeys.areAPIKeysEnabled(),
create: (createParams) =>
this.securityStart.authc.apiKeys.create(this.request, createParams),
update: (updateParams) =>
this.securityStart.authc.apiKeys.update(this.request, updateParams),
validate: (apiKeyParams) => this.securityStart.authc.apiKeys.validate(apiKeyParams),
invalidate: (apiKeyParams) =>
this.securityStart.authc.apiKeys.invalidate(this.request, apiKeyParams),
},
};
}
Expand Down

0 comments on commit 1faeaa4

Please sign in to comment.