Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add apikey authorization #148

Merged
merged 1 commit into from
Feb 21, 2025
Merged

docs: add apikey authorization #148

merged 1 commit into from
Feb 21, 2025

Conversation

Sczlog
Copy link
Collaborator

@Sczlog Sczlog commented Feb 21, 2025

增加 apikey 相关的文档说明

Copy link

github-actions bot commented Feb 21, 2025

Deploy preview for cloudtower-api-doc ready!

✅ Preview
https://cloudtower-api-2i8u4jarx-xiaojunwengs-projects.vercel.app

Built with commit 05d275d.
This pull request is being automatically deployed with vercel-action


在默认环境中,使用用户名,密码登录后即可换回 token,可以正常使用 token 进行鉴权,但是在开启了双因子认证后,无法单纯通过用户名,密码换回 token,会需要一个额外的第二因子验证,而在 API 的业务场景中,执行是无交互的,无法进行第二因子验证。

在此类环境下,如果需要使用 CloudTower API,可以选择使用 API Key 进行鉴权。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在此类环境下,如果需要使用 CloudTower API,可以选择使用 API Key 进行鉴权。

只在此类环境下吗?是不是应该无论什么情况下,都建议用户优先使用 API key 做鉴权 ?

import GetToken from '../../code_blocks/GetToken.md'
import GetTokenResponse from '../../code_blocks/GetTokenResponse.md'
import GetToken from '../../../code_blocks/GetToken.md'
import GetTokenResponse from '../../../code_blocks/GetTokenResponse.md'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文档可能需要加多一个提示,使用 token 鉴权的话,如果对接 cloudtower 环境开启了双因子,则无法换取到 token ?

@netweng netweng merged commit 5212177 into master Feb 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants