Bluelink: make Kia/Hyundai compatible
Some checks failed
Some checks failed
This commit is contained in:
parent
46569c73ac
commit
4433a2422d
2 changed files with 4 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ func NewHyundaiFromConfig(other map[string]interface{}) (api.Vehicle, error) {
|
|||
CCSPApplicationID: bluelink.HyundaiAppID,
|
||||
AuthClientID: "64621b96-0f0d-11ec-82a8-0242ac130003",
|
||||
BrandAuthUrl: "https://eu-account.hyundai.com/auth/realms/euhyundaiidm/protocol/openid-connect/auth?client_id=%s&scope=openid%%20profile%%20email%%20phone&response_type=code&hkid_session_reset=true&redirect_uri=%s/api/v1/user/integration/redirect/login&ui_locales=%s&state=%s:%s",
|
||||
PushType: "GCM",
|
||||
}
|
||||
|
||||
return newBluelinkFromConfig("hyundai", other, settings)
|
||||
|
|
@ -45,6 +46,7 @@ func NewKiaFromConfig(other map[string]interface{}) (api.Vehicle, error) {
|
|||
CCSPApplicationID: bluelink.KiaAppID,
|
||||
AuthClientID: "572e0304-5f8d-4b4c-9dd5-41aa84eed160",
|
||||
BrandAuthUrl: "https://eu-account.kia.com/auth/realms/eukiaidm/protocol/openid-connect/auth?client_id=%s&scope=openid%%20profile%%20email%%20phone&response_type=code&hkid_session_reset=true&redirect_uri=%s/api/v1/user/integration/redirect/login&ui_locales=%s&state=%s:%s",
|
||||
PushType: "APNS",
|
||||
}
|
||||
|
||||
return newBluelinkFromConfig("kia", other, settings)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ type Config struct {
|
|||
BasicToken string
|
||||
CCSPServiceID string
|
||||
CCSPApplicationID string
|
||||
PushType string
|
||||
}
|
||||
|
||||
// Identity implements the Kia/Hyundai bluelink identity.
|
||||
|
|
@ -68,7 +69,7 @@ func (v *Identity) getDeviceID() (string, error) {
|
|||
uuid := uuid.NewString()
|
||||
data := map[string]interface{}{
|
||||
"pushRegId": lo.RandomString(64, []rune("0123456789ABCDEF")),
|
||||
"pushType": "APNS",
|
||||
"pushType": v.config.PushType,
|
||||
"uuid": uuid,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue