[arquillian-issues] [JBoss JIRA] Commented: (ARQAJO-28) Support addCustomRequestHeader(String, String) for AjaxSelenium

Lukas Fryc (JIRA) jira-events at lists.jboss.org
Sat Mar 26 14:41:37 EDT 2011


    [ https://issues.jboss.org/browse/ARQAJO-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591984#comment-12591984 ] 

Lukas Fryc commented on ARQAJO-28:
----------------------------------

Can you please elaborate and API you have suggested?
You propose to use following to add authorization?

{code:Java}
String credentials = URLUtils.encodeBase64Credentials(username, password);
Header authorizationHeader = new Header("Authorization", "Basic " + credentials);
selenium.addCustomRequestHeader(authorizationHeader);
{code}

I propose to introduce utility class for manipulation with common request like:

{code:Java}
Header authorizationHeader = HeaderUtils.createBasicAuthorization(username, password);
{code}

> Support addCustomRequestHeader(String,String) for AjaxSelenium
> --------------------------------------------------------------
>
>                 Key: ARQAJO-28
>                 URL: https://issues.jboss.org/browse/ARQAJO-28
>             Project: Arquillian Ajocado
>          Issue Type: Feature Request
>    Affects Versions: 1.0.0.Alpha1
>            Reporter: Karel Piwko
>            Assignee: Karel Piwko
>             Fix For: 1.0.0.Alpha2
>
>
> AjaxSelenium is not able to add a custom request header to request. 
> DefaultSelenium functionality allows you to modify all out coming requests by adding a header(it can't be removed though). This is need for testing things like HTTP Basic Authorization.
> e.g.
> <code>browser.addCustomRequestHeader("Authorization", "Basic " + encodeCredentials("user", "password"));</code>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list