UNPKG

ohayolibs

Version:

Ohayo is a set of essential modules for ohayojp.

22 lines (19 loc) 674 B
import { OhayoAuthConfig, OhayoConfigService } from '@ohayo/util'; export const AUTH_DEFAULT_CONFIG: OhayoAuthConfig = { store_key: `_token`, token_invalid_redirect: true, token_exp_offset: 10, token_send_key: `token`, // tslint:disable-next-line: no-invalid-template-strings token_send_template: '${token}', token_send_place: 'header', login_url: '/login', ignores: [/\/login/, /assets\//, /passport\//], allow_anonymous_key: `_allow_anonymous`, executeOtherInterceptors: true, refreshTime: 3000, refreshOffset: 6000, }; export function mergeConfig(srv: OhayoConfigService): OhayoAuthConfig { return srv.merge('auth', AUTH_DEFAULT_CONFIG)!; }