OK - so I think I've narrowed it down to ressource "auth" action "token"
This is what I'm sending (the token value is the one returned on a "auth", "user" call)
{
"TransactionNr": 8384128664754975,
"Requests": [
{
"Ressource": "auth",
"Action": "token",
"Payload": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJyMyBhcHBsaWNhdGlvbiIsInN1YiI6Im1lc3NhZ2luZyIsImV4cCI6MTc2MzAzMTU5MiwiaWF0IjoxNzYyNDI2NzkyLCJhZG1pbiI6dHJ1ZSwibG9naW5JZCI6MTc5LCJ0eXBlIjoibG9jYWwiLCJub0F1dGgiOmZhbHNlfQ.S7gTAZ5WIZiBVGtdl-11Lej4BuGkEzfVfsHYrr-fgTc"
}
}
]
}
Does that look right to you? The code has changed from :
`func LoginAuthToken(ctx context.Context, reqJson json.RawMessage, loginId *int64, admin *bool, noAuth *bool) (interface{}, error) {
var (
err error
req struct {
Token string `json:"token"`
}
res struct {
LoginId int64 `json:"loginId"`
LoginName string `json:"loginName"`
}
)
if err := json.Unmarshal(reqJson, &req); err != nil {
return nil, err
}
res.LoginName, _, err = login_auth.Token(ctx, req.Token, loginId, admin, noAuth)
if err != nil {
return nil, err
}
res.LoginId = *loginId
return res, nil
}`
to
func LoginAuthToken(ctx context.Context, reqJson json.RawMessage) (types.LoginAuthResult, error) {
var req string
if err := json.Unmarshal(reqJson, &req); err != nil {
return types.LoginAuthResult{}, err
}
return login_auth.Token(ctx, req)
}
The response I get is this :
{
"transactionNr": 8384128664754975,
"responses": [],
"error": "AUTH_ERROR"
}