-
Notifications
You must be signed in to change notification settings - Fork 31
/
ITokenCacheSerializer.xml
263 lines (261 loc) Β· 20.1 KB
/
ITokenCacheSerializer.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<Type Name="ITokenCacheSerializer" FullName="Microsoft.Identity.Client.ITokenCacheSerializer">
<TypeSignature Language="C#" Value="public interface ITokenCacheSerializer" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit ITokenCacheSerializer" />
<TypeSignature Language="DocId" Value="T:Microsoft.Identity.Client.ITokenCacheSerializer" />
<TypeSignature Language="VB.NET" Value="Public Interface ITokenCacheSerializer" />
<TypeSignature Language="F#" Value="type ITokenCacheSerializer = interface" />
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.48.1.0</AssemblyVersion>
<AssemblyVersion>4.49.1.0</AssemblyVersion>
<AssemblyVersion>4.51.0.0</AssemblyVersion>
<AssemblyVersion>4.52.0.0</AssemblyVersion>
<AssemblyVersion>4.53.0.0</AssemblyVersion>
<AssemblyVersion>4.54.0.0</AssemblyVersion>
<AssemblyVersion>4.54.1.0</AssemblyVersion>
<AssemblyVersion>4.55.0.0</AssemblyVersion>
<AssemblyVersion>4.56.0.0</AssemblyVersion>
<AssemblyVersion>4.57.0.0</AssemblyVersion>
<AssemblyVersion>4.58.0.0</AssemblyVersion>
<AssemblyVersion>4.58.1.0</AssemblyVersion>
<AssemblyVersion>4.59.0.0</AssemblyVersion>
<AssemblyVersion>4.60.0.0</AssemblyVersion>
<AssemblyVersion>4.60.1.0</AssemblyVersion>
<AssemblyVersion>4.60.2.0</AssemblyVersion>
<AssemblyVersion>4.60.3.0</AssemblyVersion>
<AssemblyVersion>4.61.0.0</AssemblyVersion>
<AssemblyVersion>4.61.1.0</AssemblyVersion>
<AssemblyVersion>4.61.3.0</AssemblyVersion>
<AssemblyVersion>4.62.0.0</AssemblyVersion>
<AssemblyVersion>4.63.0.0</AssemblyVersion>
<AssemblyVersion>4.64.0.0</AssemblyVersion>
<AssemblyVersion>4.64.1.0</AssemblyVersion>
<AssemblyVersion>4.65.0.0</AssemblyVersion>
<AssemblyVersion>4.66.0.0</AssemblyVersion>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Docs>
<summary>
This interface will be available in TokenCacheNotificationArgs callback to enable serialization/deserialization of the cache.
</summary>
<remarks>
The methods in this class are not thread safe. It is expected that they will be called from the token cache callbacks,
registered via SetBeforeAccess, SetAfterAccess. These callbacks thread safe because they are triggered sequentially.
</remarks>
</Docs>
<Members>
<Member MemberName="DeserializeAdalV3">
<MemberSignature Language="C#" Value="public void DeserializeAdalV3 (byte[] adalV3State);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DeserializeAdalV3(unsigned int8[] adalV3State) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Sub DeserializeAdalV3 (adalV3State As Byte())" />
<MemberSignature Language="F#" Value="abstract member DeserializeAdalV3 : byte[] -> unit" Usage="iTokenCacheSerializer.DeserializeAdalV3 adalV3State" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="adalV3State" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="adalV3State">Byte stream representation of the cache</param>
<summary>
Deserializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format.
This API should only be used to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later.
Use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> in addition to <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly.
</summary>
<remarks>
Do not use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> without also using <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />,
because only refresh tokens are exported in this format. Your applications will not cache access token and id tokens,
and will instead need to get them from the identity provider (AAD), which will eventually throttle you.
Later versions of ADAL (4.x and 5.x) use the same cache format as MSAL.
Only <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
ADAL to MSAL cache interop is only available for public client scenarios and for web site scenario.
</remarks>
</Docs>
</Member>
<Member MemberName="DeserializeMsalV2">
<MemberSignature Language="C#" Value="public void DeserializeMsalV2 (byte[] msalV2State);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DeserializeMsalV2(unsigned int8[] msalV2State) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV2(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Sub DeserializeMsalV2 (msalV2State As Byte())" />
<MemberSignature Language="F#" Value="abstract member DeserializeMsalV2 : byte[] -> unit" Usage="iTokenCacheSerializer.DeserializeMsalV2 msalV2State" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Obsolete("Support for the MSAL v2 token cache format will be dropped in the next major version", false)]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Support for the MSAL v2 token cache format will be dropped in the next major version", false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msalV2State" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="msalV2State">Byte stream representation of the cache</param>
<summary>
Deserializes the token cache to the MSAL.NET 2.x cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications.
If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x,
you might also want to serialize and deserialize with <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> or <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV2" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV2(System.Byte[])" />,
otherwise just use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
</summary>
<remarks>
<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
</remarks>
</Docs>
</Member>
<Member MemberName="DeserializeMsalV3">
<MemberSignature Language="C#" Value="public void DeserializeMsalV3 (byte[] msalV3State, bool shouldClearExistingCache = false);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DeserializeMsalV3(unsigned int8[] msalV3State, bool shouldClearExistingCache) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub DeserializeMsalV3 (msalV3State As Byte(), Optional shouldClearExistingCache As Boolean = false)" />
<MemberSignature Language="F#" Value="abstract member DeserializeMsalV3 : byte[] * bool -> unit" Usage="iTokenCacheSerializer.DeserializeMsalV3 (msalV3State, shouldClearExistingCache)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msalV3State" Type="System.Byte[]" />
<Parameter Name="shouldClearExistingCache" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="msalV3State">Byte stream representation of the cache</param>
<param name="shouldClearExistingCache">
Set to true to clear MSAL cache contents. Defaults to false.
You would want to set this to true if you want the cache contents in memory to be exactly what's on disk.
You would want to set this to false if you want to merge the contents of what's on disk with your current in memory state.
</param>
<summary>
Deserializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java.
If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later,
you might also want to serialize and deserialize with <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" />,
otherwise just use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
</summary>
<remarks>
This is the recommended format for maintaining SSO state between applications.
<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
</remarks>
</Docs>
</Member>
<Member MemberName="SerializeAdalV3">
<MemberSignature Language="C#" Value="public byte[] SerializeAdalV3 ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] SerializeAdalV3() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />
<MemberSignature Language="VB.NET" Value="Public Function SerializeAdalV3 () As Byte()" />
<MemberSignature Language="F#" Value="abstract member SerializeAdalV3 : unit -> byte[]" Usage="iTokenCacheSerializer.SerializeAdalV3 " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Serializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format.
If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later,
use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> in addition to <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly.
</summary>
<returns>Byte stream representation of the cache</returns>
<remarks>
Do not use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> without also using <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />,
because only refresh tokens are exported in this format. Your applications will not cache access token and id tokens,
and will instead need to get them from the identity provider (AAD), which will eventually throttle you.
Later versions of ADAL (4.x and 5.x) use the same cache format as MSAL.
Only <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
ADAL to MSAL cache interop is only available for public client scenarios and for web site scenario.
</remarks>
</Docs>
</Member>
<Member MemberName="SerializeMsalV2">
<MemberSignature Language="C#" Value="public byte[] SerializeMsalV2 ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] SerializeMsalV2() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV2" />
<MemberSignature Language="VB.NET" Value="Public Function SerializeMsalV2 () As Byte()" />
<MemberSignature Language="F#" Value="abstract member SerializeMsalV2 : unit -> byte[]" Usage="iTokenCacheSerializer.SerializeMsalV2 " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Obsolete("Support for the MSAL v2 token cache format will be dropped in the next major version", false)]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Support for the MSAL v2 token cache format will be dropped in the next major version", false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Serializes the token cache to the MSAL.NET 2.x unified cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications.
If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x,
you might also want to serialize and deserialize with <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" /> or <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV2" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV2(System.Byte[])" />,
otherwise just use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
</summary>
<returns>Byte stream representation of the cache</returns>
<remarks>
<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
</remarks>
</Docs>
</Member>
<Member MemberName="SerializeMsalV3">
<MemberSignature Language="C#" Value="public byte[] SerializeMsalV3 ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] SerializeMsalV3() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />
<MemberSignature Language="VB.NET" Value="Public Function SerializeMsalV3 () As Byte()" />
<MemberSignature Language="F#" Value="abstract member SerializeMsalV3 : unit -> byte[]" Usage="iTokenCacheSerializer.SerializeMsalV3 " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Client</AssemblyName>
<AssemblyVersion>4.66.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Serializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java.
If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later,
you might also want to serialize and deserialize with <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeAdalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeAdalV3(System.Byte[])" />,
otherwise just use <see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" />.
</summary>
<returns>Byte stream representation of the cache</returns>
<remarks>
This is the recommended format for maintaining SSO state between applications.
<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.SerializeMsalV3" />/<see cref="M:Microsoft.Identity.Client.ITokenCacheSerializer.DeserializeMsalV3(System.Byte[],System.Boolean)" /> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.
</remarks>
</Docs>
</Member>
</Members>
</Type>