public void DeleteAccessToken(MsalAccessTokenCacheKey cacheKey)
        {
            var account = cacheKey.GetiOSAccountKey();
            var service = cacheKey.GetiOSServiceKey();

            var type = (int)CredentialAttrType.AccessToken;

            Remove(account, service, type);
        }
        public string GetAccessToken(MsalAccessTokenCacheKey accessTokenKey)
        {
            var account = accessTokenKey.GetiOSAccountKey();
            var service = accessTokenKey.GetiOSServiceKey();

            var type = (int)CredentialAttrType.AccessToken;

            return(GetValue(account, service, type));
        }
        public void MsalAccessTokenCacheKey()
        {
            MsalAccessTokenCacheKey key = new MsalAccessTokenCacheKey("login.microsoftonline.com", "contoso.com", "uid.utid", "clientid", "user.read user.write");

            Assert.AreEqual("uid.utid-login.microsoftonline.com-accesstoken-clientid-contoso.com-user.read user.write", key.ToString());

            Assert.AreEqual("uid.utid-login.microsoftonline.com", key.GetiOSAccountKey());
            Assert.AreEqual("accesstoken-clientid-contoso.com-user.read user.write", key.GetiOSServiceKey());
            Assert.AreEqual("accesstoken-clientid-contoso.com", key.GetiOSGenericKey());

            Assert.AreEqual("uid.utid-login.microsoftonline.com-accesstoken-clientid-contoso.com-n5wvhdusof/wfsjgk1muxrk89nwfynymsl4qefkynbu=", key.GetUWPFixedSizeKey());
        }