mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Log OAuth token payload
This commit is contained in:
parent
514f77dca6
commit
8684ac8c5f
1 changed files with 11 additions and 0 deletions
|
@ -387,6 +387,17 @@ public class FragmentOAuth extends FragmentBase {
|
|||
EmailProvider provider = EmailProvider.getProvider(context, id);
|
||||
String aprotocol = (provider.imap.starttls ? "imap" : "imaps");
|
||||
|
||||
if (accessToken != null) {
|
||||
String[] segments = accessToken.split("\\.");
|
||||
if (segments.length > 1)
|
||||
try {
|
||||
String payload = new String(Base64.decode(segments[1], Base64.DEFAULT));
|
||||
EntityLog.log(context, "token payload=" + payload);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (jwt != null) {
|
||||
// https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens
|
||||
String[] segments = jwt.split("\\.");
|
||||
|
|
Loading…
Reference in a new issue