tachybase_todo/packages/plugins/@tachybase/plugin-cas/src/server/plugin.ts
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

40 lines
709 B
TypeScript

import { InstallOptions, Plugin } from '@tachybase/server';
import { authType } from '../constants';
import { login } from './actions/login';
import { service } from './actions/service';
import { CASAuth } from './auth';
export class CasPlugin extends Plugin {
afterAdd() {}
beforeLoad() {}
async load() {
this.app.authManager.registerTypes(authType, {
auth: CASAuth,
});
this.app.resource({
name: 'cas',
actions: {
service,
login,
},
});
this.app.acl.allow('cas', '*', 'public');
}
async install(options?: InstallOptions) {}
async afterEnable() {}
async afterDisable() {}
async remove() {}
}
export default CasPlugin;
//