[ 
https://issues.apache.org/jira/browse/CXF-7687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh updated CXF-7687:
-------------------------------------
    Comment: was deleted

(was: What does your code look like? I added a test and it works as expected:

[https://github.com/apache/cxf/commit/535dae33d115154fff71761306ae28b61b187ee5]

        Client client = ClientProxy.getClient(utPort);
        HTTPConduit http = (HTTPConduit) client.getConduit();
        AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
        authorizationPolicy.setUserName("Alice");
        authorizationPolicy.setPassword("ecilA");
        authorizationPolicy.setAuthorizationType("Basic");
        http.setAuthorization(authorizationPolicy);)

> AuthorizationPolicy: AuthorizationType="Bearer" has no effect
> -------------------------------------------------------------
>
>                 Key: CXF-7687
>                 URL: https://issues.apache.org/jira/browse/CXF-7687
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, Transports
>    Affects Versions: 3.2.3
>            Reporter: Dietmar Temme
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>
> Adding an AuthorizationPolicy object with AuthorizationType set to "Bearer" 
> to the Client HTTPConduit object has no effect.
> No "Authorization: Bearer xxx" header is added to the cxf request.
> Workaround: add the Authorization header directly:
> {{client.getRequestContext().put(Message.PROTOCOL_HEADERS, 
> authorizationHeader);}}
> and authorizationHeader containing the desired header/value.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to