Can I implement a custom "Authorization Type"?
for our REST service, none of the provided "Authorization Types" can be used. We use a "special String token" in a custom HTTP header field for authorization purposes. So what we would need to do:
1. Perform a POST request to a dedicated authentication service that consumes a login name and a password
2. Extract the "special String token" from the authentication service's response (if the request succeeded)
3. Store this "special String token"
4. Set the corresponding HTTP header field with the "special String token" in each request (that is assigned this type of authorization
Can we implement some kind of interface to implement this way of authorization?
Solved! Go to Solution.
There's currently no custom interface to create your own authentication methods, but one thing you could do is to set this header in an event handler of type RequestFilter.filterRequest.
Read more about Events here:
I suggest that you look for the token as a custom property in the Test case, and if it's not present, get it using some Groovy code and store it in the custom property. Then use the value to set the header on the request.
Manne Fagerlind, Ready! API Developer
first of all: Thanks for the quick reply!
Well, I'm not sure, if the benefit outweighs the cost (in our case). But at least, this is an idea we can maybe come back to, later.
(You can treat this issue as CLOSED.)