跳到主要内容

auth

帐密认证

  • 请求路由: auth
  • 交互模型: Request Response
  • 访问限制: 无

使用帐户名和密码进行登录认证,正常认证后返回token。

请求​

RSocket.rr({
"route" : "auth",
"data" : {
"username" : "user1@aspiretop",
"password" : "pass",
"scope" : "shop",
"captchaKey" : "2392ba011cbc4e9888f546cbfa20694f",
"captchaCode" : "baayz"
}
});

请求参数​

名称类型必须说明
usernameString否
passwordString否
scopeString否
captchaKeyString否
captchaCodeString否

返回​

返回认证结果

{
"token" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pb......AU3eAWOfMmNN8CMIlIvkNw",
"expires" : 3600,
"user" : {
"tenantId" : "aspiretop",
"username" : "user1@aspiretop",
"accountId" : "user1",
"domain" : "aspiretop",
"fullname" : "用户1",
"status" : 1,
"userTypes" : [ ]
}
}

返回属性​

名称类型说明
tokenStringAPI访问令牌
expiresNumber令牌有效期,单位秒

下载结果模型定义