Skip to content

Commit

Permalink
Add comments about getCookie method
Browse files Browse the repository at this point in the history
Signed-off-by: merlinz01 <[email protected]>
  • Loading branch information
merlinz01 committed Sep 11, 2024
1 parent 87e9d9e commit 6e08721
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/auth/types/jwt/jwt_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class JwtAuthentication extends AuthenticationType {
request: OpenSearchDashboardsRequest<unknown, unknown, unknown, any>,
authInfo: any
): SecuritySessionCookie {
// TODO: This logic is only applicable for JWT auth type
setExtraAuthStorage(
request,
this.getBearerToken(request) || '',
Expand Down
1 change: 1 addition & 0 deletions server/auth/types/multiple/multi_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class MultipleAuthentication extends AuthenticationType {
}

getCookie(request: OpenSearchDashboardsRequest, authInfo: any): SecuritySessionCookie {
// TODO: This logic is only applicable for JWT auth type
for (const handler of this.authHandlers.values()) {
if (handler.requestIncludesAuthInfo(request)) {
return handler.getCookie(request, authInfo);
Expand Down

0 comments on commit 6e08721

Please sign in to comment.