public static final String GROUP_LOCATION = "location";
public static final String GROUP_IMAGE = "image";
- public static final String MB_AUTH_URL = "https://id.mercedes-benz.com/as/authorization.oauth2";
- public static final String MB_TOKEN_URL = "https://id.mercedes-benz.com/as/token.oauth2";
+ public static final String MB_AUTH_URL = "https://ssoalpha.dvb.corpinter.net/v1/auth";
+ public static final String MB_TOKEN_URL = "https://ssoalpha.dvb.corpinter.net/v1/token";
public static final String CALLBACK_ENDPOINT = "/mb-callback";
public static final String OAUTH_CLIENT_NAME = "#byocar";
// https://developer.mercedes-benz.com/products/vehicle_status/docs
public static final String SCOPE_STATUS = "mb:vehicle:mbdata:vehiclestatus";
public static final String SCOPE_OFFLINE = "offline_access";
+ public static final String SCOPE_OPENID = "openid";
public static final String BASE_URL = "https://api.mercedes-benz.com/vehicledata/v2";
public static final String ODO_URL = BASE_URL + "/vehicles/%s/containers/payasyoudrive";
// https://developer.mercedes-benz.com/products/electric_vehicle_status/docs#_required_scopes
public String getScope() {
StringBuffer sb = new StringBuffer();
- sb.append(SCOPE_OFFLINE);
+ sb.append(SCOPE_OPENID).append(SPACE).append(SCOPE_OFFLINE);
if (odoScope) {
sb.append(SPACE).append(SCOPE_ODO);
}
}
public static String getCallbackIP() throws SocketException {
+ // https://stackoverflow.com/questions/901755/how-to-get-the-ip-of-the-computer-on-linux-through-java
// https://stackoverflow.com/questions/1062041/ip-address-not-obtained-in-java
for (Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces(); ifaces
.hasMoreElements();) {
void testScope() {
AccountConfiguration ac = new AccountConfiguration();
assertEquals(
- "offline_access mb:vehicle:mbdata:payasyoudrive mb:vehicle:mbdata:vehiclestatus mb:vehicle:mbdata:vehiclelock mb:vehicle:mbdata:fuelstatus mb:vehicle:mbdata:evstatus",
+ "openid offline_access mb:vehicle:mbdata:payasyoudrive mb:vehicle:mbdata:vehiclestatus mb:vehicle:mbdata:vehiclelock mb:vehicle:mbdata:fuelstatus mb:vehicle:mbdata:evstatus",
ac.getScope());
}