Custom subject creator is our most frequently used extension. When the request body object is not a servlet or jax-rs standard api, we need to customize the subject creator, make it obtain the request information we need (request path, request method, authentication information, etc.) through the request object, thereby creating the corresponding subject.
Sureness has built-in BasicSubjectServletCreator
that can create PasswordSubject
based on account password,
and create the JwtSubjectServletCreator
of the jwt type JwtSubject
, etc.
Of course, we can customize the subjectCreator we need to create the subject.
Before customization, it is recommended to understand the sureness's process and the extended interface provided, see Advanced Extension for details.
SubjectCreate
: Create a Subject
interface and create different types of Subject
objects according to the request content.Implement the SubjectCreate
interface method, and create the corresponding subject
according to different request objects.
Detail please refer to sample-spring-webflux-sureness
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。