2.0.0 • Published 2 years ago

@attus/cookie-service v2.0.0

Weekly downloads
13
License
GPL-3.0
Repository
github
Last release
2 years ago

CookieService

GitHub release Maintenance Npm package version Npm package license GitHub issues

Yes, I know, the services have weird names. I don't want to change them, in order to maintain compatibility.

In module.ts:

import {CookieServiceModule} from '@attus/cookie-service';

imports: [
  CookieServiceModule,
],

In component.ts:

import {CookieServiceService} from '@attus/cookie-service';

const a: string = this.cookieService.get(cookie_name);
this.cookieService.set(cookie_name, cookie_value);
this.cookieService.delete(cookie_name);

You may use a simplified service for Refresh Token. It is applicable for Angular Client.

In module.ts:

import { CookieTokenServiceService } from '@attus/cookie-service';

@NgModule({
  imports: [
    AngularClientModule,
  ],
  providers: [
    {
      provide: 'ANGULAR_CLIENT_TOKEN_SERVICE',
      useClass: CookieTokenServiceService,
    },
    {
      provide: 'ANGULAR_CLIENT_CONFIG',
      useValue: environment.apiClient,
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
2.0.0

2 years ago

11.1.0

3 years ago

11.0.0

3 years ago

10.2.0

4 years ago

10.0.0

4 years ago

10.0.1

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago