You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current FilterRequestContext interface doesn't offer an easy way to access cookies of the current request. This causes trouble if someone needs to implement an authentication filter based on cookies. For example, suppose I have an annotation @AuthRequired and it is applied to some resource methods (eg, all create methods) to indicate that these methods require authentication. It is natural to use a filter to support this kind of use case. However, if the authentication is cookie based, which is still common nowadays, then current FilterRequestContext interface is troublesome because it doesn't provide easy cookie access. One may argue that I could use the RestFilter interface. True, RestFilter interface allows you to access cookies easily. However, it doesn't give you access to the requested java method so that you can check if it is annotated with @AuthRequired. It would be much simpler if FilterRequestContext can allow cookie access.
The text was updated successfully, but these errors were encountered:
The current
FilterRequestContext
interface doesn't offer an easy way to access cookies of the current request. This causes trouble if someone needs to implement an authentication filter based on cookies. For example, suppose I have an annotation@AuthRequired
and it is applied to some resource methods (eg, allcreate
methods) to indicate that these methods require authentication. It is natural to use a filter to support this kind of use case. However, if the authentication is cookie based, which is still common nowadays, then currentFilterRequestContext
interface is troublesome because it doesn't provide easy cookie access. One may argue that I could use theRestFilter
interface. True,RestFilter
interface allows you to access cookies easily. However, it doesn't give you access to the requested java method so that you can check if it is annotated with@AuthRequired
. It would be much simpler ifFilterRequestContext
can allow cookie access.The text was updated successfully, but these errors were encountered: