fralonra / nestjs-cas-example

An example of using nestjs to connect CAS (Central Authentication Service).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nestjs-cas-example

An example of using nestjs to connect CAS (Central Authentication Service). Using connect-cas underlying.

Running the example

  • Clone: git clone https://github.com/fralonra/nestjs-cas-example
  • Install: cd nestjs-cas-example && yarn
  • If you wish to use the existing fake CAS server, please run yarn cas:prod. Or you can specify your CAS server settings in config/default.ts.
// config/default.ts
const casHost = '127.0.0.1';
const casPort = 8989;

export default {
  // ...
  cas: {
    protocol: 'http',
    host: `${casHost}:${casPort}`,
    paths: {
      serviceValidate: 'p3/serviceValidate',
      login: 'login',
      logout: 'logout',
    }
  }
};
  • Run the CAS client: yarn app:dev, and now you can open http://localhost:3434 (by default) to see the example.

About

An example of using nestjs to connect CAS (Central Authentication Service).


Languages

Language:TypeScript 92.2%Language:HTML 7.8%