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

NameTypeRequiredExample valueDescription
ActionStringYesLoginThe name of the operation. This is a required parameter. Set the value to Login.
LoginUrlStringYeshttps%3a%2f%2flogin.samplecompany.com%2flogin_aliyun.phpThe 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.
DestinationStringYeshttps%3a*******ecs.console.aliyun.comThe 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.
SigninTokenStringYes5aW96ZW/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.com

Error messages

HttpCodeError codeError messageDescription
400InvalidActionThe action Login is invalid.Interface Fault
400MissingParameter.LoginUrlThe parameter LoginUrl is missing.The LoginUrl parameter is missing.
400MissingParameter.SigninTokenThe parameter SigninToken is missing.The SigninToken parameter is missing.
401InvalidCredential.AuthenticateFailThe credential you provided is invalid.The authentication information is invalid. The authentication failed.
401InvalidCredential.ExpiredThe credential you provided is invalid.The authentication information expired. The authentication failed.
400InvalidParameterSome parameters are invalid.The parameters are invalid.