Sample ASP.NET Web API project with OAuth authentication and many other extensions.
- The basics of API (CRUD)
- Validation
- Authentication and authorization
- Documentation
- Other
- Samples and Examples
- Contributing
- Useful links
1. The basics of API (GoodNotesController)
- Create -> Post
- Read -> Get
- Update -> Put
- Delete -> Delete
- Basic validation (via DataAnnotations attributes)
- ModelState validation (ValidateModelStateAttribute)
- Model empty validation (CheckModelForNullAttribute)
- Action parameters validation (ActionParametersValidationAttribute)
- Access Token (OAuth bearer token authentication using OWIN middleware) (SimpleAuthorizationServerProvider)
- Client credentials validation
- Token custom parameter
- Authentication Ticket custom property
- Custom claim
- Refresh Token (SimpleRefreshTokenProvider)
- Custom Authorize attribute (SimpleAuthorizeAttribute)
- Help Pages (via Microsoft.AspNet.WebApi.HelpPage nuget package)
- Multiple XML documentation (XML comments beyond the main project)
- HTTP Status Codes (attribute to generate HTTP response codes in documentation) (ResponseHttpStatusCodeAttribute)
- Output Cache profile
- API exceptions handling (RequestExceptionAttribute)
- Working CORS (Cross-Origin Resource Sharing) implementation (CorsProvider)
You are very welcome to submit either issues or pull requests to this repository!
I'm trying to follow GitHub Flow process, so please follow this rules:
- Make changes on feature branch.
- Commit messages should be clear and as much as possible descriptive.
- Rebase if required.
- Make sure that your code compile and run locally.
- Push your feature branch to GitHub.
- Create pull request.