プロジェクト

全般

プロフィール

Vote #70058

完了

Get the API key of the user through REST API

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
開始日:
2011/06/04
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
60
issue_org_id:
8529
author_id:
7834
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I'm trying to write an automated test in Redmine Java API for case when getUsers() throws AuthorizationException for non-admin.

to do that, I first create a new user through REST API (using admin account), and then I want to send "getUsers()" request with the new user's API access key.
the problem is that I don't see a way to retrieve the API key of the user I just created.
I understand this is probably due to security reasons.
what's the right way to solve this problem?

it would be great if REST API supported the concept of "login" so that REST users would be able to "login" through REST API using their login&password (instead of API access key!) and then they'd receive some "session key" they could use temporarily for this session.

this would eliminate the problem I described above, and plus simplify the REST API usage in various UIs (people are often confused about "api access key", they want to use their login&password).


journals

never mind, feel free to close this request. I see basic HTTP auth is supported, so no API key is required. I can specify user's password when creating the user, so this solves my problem.
--------------------------------------------------------------------------------
It would be great for (mobile) apps to retrieve the API key:

# the mobile app asks for username and password
# the mobile app logs in using basic authentication (with an https url)
# the app retrieves the api key of the currently logged in user
# the app stores the api key permanently for authenticating the user the next time

--------------------------------------------------------------------------------
Good point. API key added in r11518 to @/users/current.format@.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリREST API_32 にセット
  • 対象バージョン2.3.0_60 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0