JLR: upgrade api (#12778)

This commit is contained in:
JanDragon 2024-03-08 21:02:58 +01:00 • committed by GitHub
parent 375b9fbbb7
commit ece611f35b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View file

@ -106,6 +106,8 @@ func (v *JLR) RegisterDevice(log *util.Logger, user, device string, t jlr.Token)
"Accept": "application/json",
"X-Device-Id": device,
"x-telematicsprogramtype": "jlrpy",
"x-App-Id": "ICR_JAGUAR",
"x-App-Secret": "018dd168-6271-707f-9fd4-aed2bf76905e",
})
if err == nil {
_, err = c.DoBody(req)

View file

@ -36,6 +36,8 @@ func NewAPI(log *util.Logger, device string, ts oauth2.TokenSource) *API {
"Authorization": fmt.Sprintf("Bearer %s", token.AccessToken),
"X-Device-Id": device,
"x-telematicsprogramtype": "jlrpy",
"x-App-Id": "ICR_JAGUAR",
"x-App-Secret": "018dd168-6271-707f-9fd4-aed2bf76905e",
} {
req.Header.Set(k, v)
}

View file

@ -38,6 +38,8 @@ func (v *Identity) login(data map[string]string) (Token, error) {
"Authorization": "Basic YXM6YXNwYXNz",
"Content-type": request.JSONContent,
"X-Device-Id": v.device,
"x-App-Id": "ICR_JAGUAR",
"x-App-Secret": "018dd168-6271-707f-9fd4-aed2bf76905e",
})
var token Token