oauth-2.0 - 如何在 SpringBoot 应用程序中获取授权码
问题描述
我有一个 SpringBoot 应用程序(仅提供 API,无 UI),它消耗(连接)JIRA API 并将 json 响应发送回客户端。现在我们正在实施 OAuth2 来签署 JIRA 以访问 Jira 资源。
为此,首先我需要发送Authorization Code以获取Access Code。据我所知,在以下 GET URL 的浏览器提示上提交用户/密码后,授权代码将从重定向 url 获取。
https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id={my client id}&scope={copseABC}&redirect_uri=http%3A%2F%2Flocalhost%3A8080&state=itsmychoice&response_type=code&prompt=consent
但在我的场景中,执行此过程不涉及 UI/浏览器。如何使用 java 代码获取授权码。
解决方案
推荐阅读
- python - 如何避免在嵌套字典中添加重复值?
- eclipse - Eclipse 2020-06 在 CloudFormation (YAML) 模板中的有效 !Ref 和 !Sub 上引发错误
- python - Python selenium如何检查特定的Web元素是否包含特定的关键字?
- c# - 如何将 C# 代码转换为 Kotlin 由 Json 库组成
- c - 蛮力实施的限制
- javascript - 轮播仅在代码上显示 2 个元素
- python-2.7 - 使用系统管理员以外的用户时,odoo ir.sequence 不起作用
- java - Android Studio中通过调用Rest API构造的Java对象
- javascript - 在 AJAX 响应后更改特定的 HTML 表格内容
- python - 如何确保python版本正常运行