问题描述
我想使用Jira的REST API与Jira合作,但在此之前,我想使用REST API进行登录。到目前为止,我发现可以使用用户名和api键令牌完成登录。但是我不想从门户网站创建API令牌。 因此,我们建议可以从API本身创建API令牌还是可以通过某种方式登录。
解决方法
根据Atlassian的official documentation,使用JIRA进行身份验证的方式有多种。您要使用的方式是使用基于cookie的身份验证。
This is how cookie-based authentication works in Jira at a high level:
- The client creates a new session for the user via the Jira REST API.
- Jira returns a session object that has information about the session including the session cookie. The client stores this session object.
- The client can now set the cookie in the header for all subsequent requests to the Jira REST API.