- based on
springboot
- load data from mysql dataBase dataSource, then user can modify their access control data dynamically(see
AccountProvider ResourceProvider
) - apart from having default
JWT, Basic Auth
, it adds customsubject subjectCreator processor
to define new auth type(customsubject subjectCreator processor...
). - project's protected entrance is
SurenessFilterExample
- suggest use postman to test, test case is in
sample-tom-postman.json
, user can load it in postman
The sample-tom contains two custom authentication methods
-
Customize a separate subjectCreator, see
CustomPasswdSubjectCreator
The demo function is to customize the account password of the request body from different places to create the default PasswordSubject and follow the default account password authentication process. -
Customize a whole set of processes (including subject subjectCreator processor), see
CustomTokenSubject CustomTokenSubjectCreator CustomTokenProcessor
The demo function is to customize a simple token as the subject object, and customize its creation and acquisition method-creator and custom authentication processing flow-processor.
This custom process also demonstrates a simple token refresh process.