How to use the @delon/auth.JWTTokenModel function in @delon/auth

To help you get started, we’ve selected a few @delon/auth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github personball / abplus-zero-template / angular / src / app / core / auth / app-auth.service.ts View on Github external
.subscribe(result => {
        // set abp login info
        const tokenExpireDate = remember
          ? new Date(new Date().getTime() + 1000 * result.expireInSeconds)
          : undefined;

        this._abpTokenService.setToken(result.accessToken, tokenExpireDate);

        this._utilsService.setCookieValue(
          AppConsts.authorization.encrptedAuthTokenName,
          result.encryptedAccessToken,
          tokenExpireDate,
          abp.appPath,
        );
        // 设置用户Token信息
        let jwt = new JWTTokenModel();
        jwt.token = result.accessToken;
        this._tokenService.set(jwt);

        if (callback) {
          callback();
        }
      }, (err: any) => finalize(err));
  }

@delon/auth

Simple user authentication, support Json Web Token & Simple Token.

MIT
Latest version published 3 days ago

Package Health Score

85 / 100
Full package analysis