# Authenticated Decorator operation deprecated
Module | import { Authenticated } from "@tsed/common" |
---|---|
Source | /packages/common/src/mvc/decorators/method/authenticated.ts |
# Overview
function Authenticated(options?: IAuthOptions): Function;
# Description
Use passport authentication strategy on your endpoint.
@Controller('/mypath')
class MyCtrl {
@Get('/')
@Authenticated({role: 'admin'})
public getResource(){}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
WARNING
This usage is deprecated in favor of . See Authentication page.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing