JLR: upgrade api (#12778)
This commit is contained in:
parent
375b9fbbb7
commit
ece611f35b
3 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue