Skip to content

Commit

Permalink
PSA: upgrade api
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jan 18, 2024
1 parent 872bc32 commit 0ba2255
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions vehicle/psa.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {
func NewCitroenFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log := util.NewLogger("citroen")
return newPSA(log,
"citroen.com", "clientsB2CCitroen",
"citroen.com", "clientsB2CCitroen/OTPCitroen",
"5364defc-80e6-447b-bec6-4af8d1542cae", "iE0cD8bB0yJ0dS6rO3nN1hI2wU7uA5xR4gP7lD6vM0oH0nS8dN",
other)
}
Expand All @@ -31,7 +31,7 @@ func NewCitroenFromConfig(other map[string]interface{}) (api.Vehicle, error) {
func NewDSFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log := util.NewLogger("ds")
return newPSA(log,
"driveds.com", "clientsB2CDS",
"driveds.com", "clientsB2CDS/OTPDS",
"cbf74ee7-a303-4c3d-aba3-29f5994e2dfa", "X6bE6yQ3tH1cG5oA6aW4fS6hK0cR0aK5yN2wE4hP8vL8oW5gU3",
other)
}
Expand All @@ -40,7 +40,7 @@ func NewDSFromConfig(other map[string]interface{}) (api.Vehicle, error) {
func NewOpelFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log := util.NewLogger("opel")
return newPSA(log,
"opel.com", "clientsB2COpel",
"opel.com", "clientsB2COpel/OTPOpel",
"07364655-93cb-4194-8158-6b035ac2c24c", "F2kK7lC5kF5qN7tM0wT8kE3cW1dP0wC5pI6vC0sQ5iP5cN8cJ8",
other)
}
Expand All @@ -49,7 +49,7 @@ func NewOpelFromConfig(other map[string]interface{}) (api.Vehicle, error) {
func NewPeugeotFromConfig(other map[string]interface{}) (api.Vehicle, error) {
log := util.NewLogger("peugeot")
return newPSA(log,
"peugeot.com", "clientsB2CPeugeot",
"peugeot.com", "clientsB2CPeugeot/OTPPeugeot",
"1eebc2d5-5df3-459b-a624-20abfcf82530", "T5tP7iS0cO8sC0lA2iE2aR7gK6uE5rF3lJ8pC3nO1pR7tL8vU1",
other)
}
Expand Down
2 changes: 1 addition & 1 deletion vehicle/psa/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewIdentity(log *util.Logger, brand, id, secret string) *Identity {
ClientID: id,
ClientSecret: secret,
Endpoint: oauth2.Endpoint{
AuthURL: "https://api.mpsa.com/api/connectedcar/v2/oauth/authorize",
AuthURL: "https://idpcvs.opel.com/am/oauth2/authorize",
TokenURL: fmt.Sprintf("https://idpcvs.%s/am/oauth2/access_token", brand),
AuthStyle: oauth2.AuthStyleInHeader,
},
Expand Down

0 comments on commit 0ba2255

Please sign in to comment.