Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASIHTTPRequest cannot connect to JIRA with os_authType=basic #407

Open
jigsw opened this issue Aug 19, 2016 · 0 comments
Open

ASIHTTPRequest cannot connect to JIRA with os_authType=basic #407

jigsw opened this issue Aug 19, 2016 · 0 comments

Comments

@jigsw
Copy link

jigsw commented Aug 19, 2016

I've been trying, and failing, to use Vienna to connect to JIRA's activity log RSS feed. I've seemingly tracked the problem down to line 1000 of ASIHTTPRequest.m:

if ([credentials objectForKey:@"Authentication"]) {

Dumping the credentials object shows that it is non-null, but its status is "Failed" (I've replaced the real URL with myjira, and the username and password):

2016-08-19 17:59:26.797 Vienna[12876:5863347] credentials = {
    Authentication = "<CFHTTPAuthentication 0x6180001e1f00>{state = Failed; scheme = OAuth, forProxy = false}";
    AuthenticationRealm = "http%3A%2F%2Fmyjira%3A8080";
    AuthenticationScheme = OAuth;
    Credentials =     {
        kCFHTTPAuthenticationPassword = "password";
        kCFHTTPAuthenticationUsername = username;
    };
    URL = "http://myjira:8080/activity?maxResults=500&os_authType=basic&title=undefined";
}

So, I've replaced line 1000 of ASIHTTPRequest with:

CFHTTPAuthenticationRef auth = (CFHTTPAuthenticationRef)[credentials objectForKey:@"Authentication"];
if (auth && CFHTTPAuthenticationIsValid(auth, nil)) {

And it now works - it connects to JIRA fine. It obviously doesn't do anything with the error yet (I've just passed nil), but is this solution along the right lines?

Many thanks,
James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant