@capgo/capacitor-persistent-account 0.0.2 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/android/src/main/java/ee/forgr/capacitor_persistent_account/CapacitorPersistentAccount.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor_persistent_account/auth/Authenticator.java +12 -5
- package/android/src/main/java/ee/forgr/capacitor_persistent_account/auth/AuthenticatorService.java +1 -2
- package/android/src/main/res/xml/authenticator.xml +0 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/android/src/main/java/ee/forgr/capacitor_persistent_account/CapacitorPersistentAccount.java
CHANGED
|
@@ -3,11 +3,11 @@ package ee.forgr.capacitor_persistent_account;
|
|
|
3
3
|
import android.accounts.Account;
|
|
4
4
|
import android.accounts.AccountManager;
|
|
5
5
|
import android.content.Context;
|
|
6
|
-
|
|
7
6
|
import org.json.JSONException;
|
|
8
7
|
import org.json.JSONObject;
|
|
9
8
|
|
|
10
9
|
class CapacitorPersistentAccount {
|
|
10
|
+
|
|
11
11
|
static final String ACCOUNT_TYPE = "ee.forgr.capacitor_persistent_account";
|
|
12
12
|
static final String ACCOUNT_NAME = "CapacitorPersistentAccount";
|
|
13
13
|
static final String USERDATA_JSON = "userdata_json";
|
|
@@ -8,6 +8,7 @@ import android.content.Context;
|
|
|
8
8
|
import android.os.Bundle;
|
|
9
9
|
|
|
10
10
|
public class Authenticator extends AbstractAccountAuthenticator {
|
|
11
|
+
|
|
11
12
|
public Authenticator(Context context) {
|
|
12
13
|
super(context);
|
|
13
14
|
}
|
|
@@ -18,7 +19,13 @@ public class Authenticator extends AbstractAccountAuthenticator {
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
@Override
|
|
21
|
-
public Bundle addAccount(
|
|
22
|
+
public Bundle addAccount(
|
|
23
|
+
AccountAuthenticatorResponse response,
|
|
24
|
+
String accountType,
|
|
25
|
+
String authTokenType,
|
|
26
|
+
String[] requiredFeatures,
|
|
27
|
+
Bundle options
|
|
28
|
+
) throws NetworkErrorException {
|
|
22
29
|
return null; // We don't provide an explicit add-account UI
|
|
23
30
|
}
|
|
24
31
|
|
|
@@ -28,7 +35,8 @@ public class Authenticator extends AbstractAccountAuthenticator {
|
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
@Override
|
|
31
|
-
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options)
|
|
38
|
+
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options)
|
|
39
|
+
throws NetworkErrorException {
|
|
32
40
|
throw new UnsupportedOperationException();
|
|
33
41
|
}
|
|
34
42
|
|
|
@@ -38,7 +46,8 @@ public class Authenticator extends AbstractAccountAuthenticator {
|
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
@Override
|
|
41
|
-
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options)
|
|
49
|
+
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options)
|
|
50
|
+
throws NetworkErrorException {
|
|
42
51
|
return null;
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -49,5 +58,3 @@ public class Authenticator extends AbstractAccountAuthenticator {
|
|
|
49
58
|
return result;
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
|
-
|
|
53
|
-
|
package/android/src/main/java/ee/forgr/capacitor_persistent_account/auth/AuthenticatorService.java
CHANGED
|
@@ -5,6 +5,7 @@ import android.content.Intent;
|
|
|
5
5
|
import android.os.IBinder;
|
|
6
6
|
|
|
7
7
|
public class AuthenticatorService extends Service {
|
|
8
|
+
|
|
8
9
|
private Authenticator authenticator;
|
|
9
10
|
|
|
10
11
|
@Override
|
|
@@ -18,5 +19,3 @@ public class AuthenticatorService extends Service {
|
|
|
18
19
|
return authenticator.getIBinder();
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
android:accountType="ee.forgr.capacitor_persistent_account"
|
|
4
|
-
android:icon="@mipmap/ic_launcher"
|
|
5
|
-
android:smallIcon="@mipmap/ic_launcher"
|
|
6
4
|
android:label="@string/capacitor_persistent_account_label"/>
|
|
7
5
|
|
|
8
6
|
|
package/package.json
CHANGED