Skip to content

Commit

Permalink
Address nits
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Nov 22, 2019
1 parent 129d6b4 commit c7f9e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/core/server/http/cookie_session_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export async function createCookieSessionStorageFactory<T>(
basePath?: string
): Promise<SessionStorageFactory<T>> {
function clearInvalidCookie(req: Request | undefined, path: string = basePath || '/') {
// if the cookie did not include the 'path' or 'isSecure' attributes in the session value, it is a legacy cookie
// if the cookie did not include the 'path' attribute in the session value, it is a legacy cookie
// we will assume that the cookie was created with the current configuration
log.debug(`Clearing invalid session cookie`);
// need to use Hapi toolkit to clear cookie with defined options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ function getMockOptions(config: Partial<AuthenticatorOptions['config']> = {}) {
basePath: httpServiceMock.createSetupContract().basePath,
loggers: loggingServiceMock.create(),
isSystemAPIRequest: jest.fn(),
config: {
sessionTimeout: null,
authc: { providers: [], oidc: {}, saml: {} },
secureCookies: false,
...config,
},
config: { sessionTimeout: null, authc: { providers: [], oidc: {}, saml: {} }, ...config },
sessionStorageFactory: sessionStorageMock.createFactory<ProviderSession>(),
};
}
Expand Down

0 comments on commit c7f9e12

Please sign in to comment.