Private
Public Access
1
0

Auth: Use Set-Cookie for auth token

This commit is contained in:
2021-07-06 23:41:51 -07:00
parent 641e4c53fa
commit 7a3303da06
3 changed files with 12 additions and 4 deletions

View File

@@ -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);
}