简体   繁体   中英

Checking header for token presence

Is it possible to check header for available token and other OAuth values with ActiveWeb ? Are there any examples repos ? Thank you.

There are no example repos, but you can access and set headers in controllers and filters:

http://javalite.github.io/activeweb/snapshot/org/javalite/activeweb/HttpSupport.html#header-java.lang.String-

so:

header(String name,String value); // sets a header on response
headers();                        // gets all request headers
header(String name);              // returns a request header

Once you have a header, you can do whatever you need to.

All controllers have these methods out of the box. If you need to do this in a filter, you would inherit this class:

http://javalite.github.io/activeweb/snapshot/org/javalite/activeweb/controller_filters/HttpSupportFilter.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM