Auth: Use Set-Cookie for auth token
This commit is contained in:
@@ -60,9 +60,14 @@
|
||||
MBIMAuthToken *token = [[MBIMAuthToken alloc] initWithUsername:username];
|
||||
|
||||
// All systems go
|
||||
response = [MBIMJSONDataResponse responseWithJSONObject:@{
|
||||
MBIMJSONDataResponse *dataResponse = [MBIMJSONDataResponse responseWithJSONObject:@{
|
||||
@"jwt" : token.jwtToken
|
||||
}];
|
||||
|
||||
// Send a cookie down so we can use httpOnly cookies
|
||||
dataResponse.httpHeaders[@"Set-Cookie"] = [NSString stringWithFormat:@"auth_token=%@", token.jwtToken];
|
||||
|
||||
response = dataResponse;
|
||||
} while (NO);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user