Skip to content

[REQ] [JAVA] [SPRING] add option to pass authorization token in a method parameter instead of interceptor #24087

Description

@adamslaski

Problem

My service is written in Java Spring and I want to use open feign for rest clients. My service performs simultaneously multiple actions, each on behalf of a different principal. As of now an interceptor the only option to authorize requests, and it is cumbersome to use interceptor in my service, as the interceptor have no easy way of knowing what principal to use.

Solution

I would like to pass authorization in a method parameter instead of using interceptor. E.g.

    String somethingGet(@RequestHeader(value = "Authorization") String auth);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions