Exemple #1
0
        private NativeCredential GetCredentialFromAccount(Account account)
        {
            NativeCredential nc = null;

            try
            {
                var serializedNativeCredential = accountManager.GetUserData(account, Constants.STR_CREDENTIAL);
                nc = NativeCredential.Deserialize(serializedNativeCredential);
            }
            catch (Exception e)
            {
                throw new KinveyException(EnumErrorCategory.ERROR_USER, EnumErrorCode.ERROR_USER_GET_CREDENTIAL_FOR_ACCOUNT, "", e);
            }

            return(nc);
        }
Exemple #2
0
        private NativeCredential GetCredentialFromRecord(SecRecord record)
        {
            var serializedNativeCredential = NSString.FromData(record.Generic, NSStringEncoding.UTF8);

            return(NativeCredential.Deserialize(serializedNativeCredential));
        }