mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-01 02:23:45 +00:00
[android]Remove OSM Auth in app
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
ea0d19a66c
commit
2aa8179985
@@ -31,24 +31,6 @@ JNIEXPORT jstring JNICALL Java_app_organicmaps_sdk_editor_OsmOAuth_nativeGetOAut
|
||||
return ToJavaString(env, auth.BuildOAuth2Url());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_app_organicmaps_sdk_editor_OsmOAuth_nativeAuthWithPassword(JNIEnv * env, jclass clazz,
|
||||
jstring login,
|
||||
jstring password)
|
||||
{
|
||||
OsmOAuth auth = OsmOAuth::ServerAuth();
|
||||
try
|
||||
{
|
||||
if (auth.AuthorizePassword(ToNativeString(env, login), ToNativeString(env, password)))
|
||||
return ToJavaString(env, auth.GetAuthToken());
|
||||
LOG(LWARNING, ("nativeAuthWithPassword: invalid login or password."));
|
||||
}
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
LOG(LWARNING, ("nativeAuthWithPassword error ", ex.what()));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_app_organicmaps_sdk_editor_OsmOAuth_nativeAuthWithOAuth2Code(JNIEnv * env, jclass,
|
||||
jstring oauth2code)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user