Login
更新时间:
复制 MD 格式
Call the Login operation to log on to the Alibaba Cloud Management Console with a logon token.
Description
After you call the GetSigninToken operation to obtain a logon token, assemble a URL with the request parameters for the Login operation. Use this URL to redirect the browser to the destination page. The temporary security token (SigninToken) is valid for 30 seconds and can be used only once. Generate the token when you redirect the user.
- This is a logon operation. The request structure is
https://signin.aliyun.com/federation?Action=xx&Parameters.- Action: The operation to perform.
- Parameters: The custom request parameters for the API. This does not include common parameters.
- This operation does not require a signature.
Request parameters
| Name | Type | Required | Example value | Description |
| Action | String | Yes | Login | The name of the operation. This is a required parameter. Set the value to Login. |
| LoginUrl | String | Yes | https%3a%2f%2flogin.samplecompany.com%2flogin_aliyun.php | The URL of the logon page. If a user's logon session on Alibaba Cloud expires, Alibaba Cloud prompts the user to return to this URL to log on. The parameter must be URL-encoded. |
| Destination | String | Yes | https%3a*******ecs.console.aliyun.com | The URL of the destination page to which the user is redirected after a successful logon. For example, to redirect the user to the ECS console, specify the URL of the ECS console. The URL must be an official Alibaba Cloud website address. The parameter must be URL-encoded. |
| SigninToken | String | Yes | 5aW96ZW/5a*******9rZW7lkYA= | The temporary security token obtained by calling the GetSignInToken operation. The parameter must be URL-encoded. |
Request example
https://signin.aliyun.com/federation?Action=Login
&LoginUrl=https%3a%2f%2flogin.samplecompany.com%2flogin_aliyun.php
&Destination=https%3a*******ecs.console.aliyun.com
&SigninToken=5aW96ZW/5a*******9rZW7lkYA= Response example
HTTP/1.1 302 Found
Location: https://ecs.console.aliyun.comError messages
| HttpCode | Error code | Error message | Description |
| 400 | InvalidAction | The action Login is invalid. | Interface Fault |
| 400 | MissingParameter.LoginUrl | The parameter LoginUrl is missing. | The LoginUrl parameter is missing. |
| 400 | MissingParameter.SigninToken | The parameter SigninToken is missing. | The SigninToken parameter is missing. |
| 401 | InvalidCredential.AuthenticateFail | The credential you provided is invalid. | The authentication information is invalid. The authentication failed. |
| 401 | InvalidCredential.Expired | The credential you provided is invalid. | The authentication information expired. The authentication failed. |
| 400 | InvalidParameter | Some parameters are invalid. | The parameters are invalid. |
该文章对您有帮助吗?