Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
343ef14c
Commit
343ef14c
authored
4 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
OAuth: remember token scope
Change-Id: I5da233b3792215626fd82e827509ef95528e5be8
parent
7c8491ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/server_account_manager.cpp
+3
-1
3 additions, 1 deletion
src/jamidht/server_account_manager.cpp
with
3 additions
and
1 deletion
src/jamidht/server_account_manager.cpp
+
3
−
1
View file @
343ef14c
...
...
@@ -245,6 +245,7 @@ ServerAccountManager::setToken(std::string token, TokenScope scope)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
tokenLock_
);
token_
=
std
::
move
(
token
);
tokenScope_
=
scope
;
nameDir_
.
get
().
setToken
(
token_
);
if
(
not
token_
.
empty
())
{
auto
&
reqQueue
=
getRequestQueue
(
scope
);
...
...
@@ -374,7 +375,8 @@ ServerAccountManager::searchUser(const std::string& query, SearchCallback cb)
if
(
response
.
status_code
>=
200
&&
response
.
status_code
<
300
)
{
try
{
Json
::
Value
::
ArrayIndex
rcount
=
json
.
size
();
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>
results
(
rcount
);
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>
results
;
results
.
reserve
(
rcount
);
JAMI_WARN
(
"[Search] Got server response: %s"
,
response
.
body
.
c_str
());
for
(
Json
::
Value
::
ArrayIndex
i
=
0
;
i
<
rcount
;
i
++
)
{
const
auto
&
ruser
=
json
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment