/
com.microsoft.aad.adal.AuthenticationContext.yml
1024 lines (924 loc) · 88.9 KB
/
com.microsoft.aad.adal.AuthenticationContext.yml
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### YamlMime:JavaType
constructors:
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
parameters:
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref>
</p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority Url </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Cache <xref uid="com.microsoft.aad.adal.ITokenCacheStore" data-throw-if-not-resolved="false" data-raw-source="ITokenCacheStore"></xref> used to store tokens. Set to null if you don't want cache. </p>
name: tokenCacheStore
type: '@Nullable final <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>'
summary: >-
<p>It will verify the authority and use the given cache. If cache is null, it will not use cache.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,@Nullable final ITokenCacheStore)
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
parameters:
- description: <p>It needs to have handle to the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref> to use the SharedPreferencesFileManager as a Default cache storage. It does not need to be activity. </p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority url to send code and token requests </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>validate authority before sending token request </p>
name: validateAuthority
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>Constructs context to use with known authority to get the token. It uses default cache that stores encrypted tokens.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,final boolean)
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
parameters:
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref>
</p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority Url </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>true/false for validation </p>
name: validateAuthority
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
- description: <p>Set to null if you don't want cache. </p>
name: tokenCacheStore
type: '@Nullable final <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>'
summary: >-
<p>Constructs context to use with known authority to get the token. It uses provided cache.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,final boolean,@Nullable final ITokenCacheStore)
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False"/>
methods:
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO. if <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> is Always, it will display prompt screen.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable PromptBehavior,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. This parameter will be used to pre-populate the username field in the authentication form. Please note that the end user can still edit the username field and authenticate as a different user. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. The parameter can be null. </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use the refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and fall back on the UI.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required to launch authentication activity. </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use package name info if not provided. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>login hint (optional if validateAuthority == false) </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and start authentication.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="final+Activity?alt=final+Activity&text=final+Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed.</p>
<p></p>
syntax: public void acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final Activity,final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>It accepts both type of fragments. </p>
name: fragment
type: final <xref href="com.microsoft.aad.adal.IWindowComponent?alt=com.microsoft.aad.adal.IWindowComponent&text=IWindowComponent" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed.</p>
<p></p>
syntax: public void acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final IWindowComponent,final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>is not AUTO or claims are passed. This overload uses an [AlertDialog](<a href="https://developer.android.com/guide/topics/ui/dialogs">https://developer.android.com/guide/topics/ui/dialogs</a>) when user interaction is required. This overload does not support any flow requiring a [token broker](<a href="https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker">https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker</a>).</p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: <p>acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> and can be used to call the specified protected resource. Bypasses token cache if </p>
syntax: public void acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>It accepts both type of fragments. </p>
name: fragment
type: <xref href="com.microsoft.aad.adal.IWindowComponent?alt=com.microsoft.aad.adal.IWindowComponent&text=IWindowComponent" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>It will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO.</p>
<p></p>
syntax: public void acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(IWindowComponent,String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> and can be used to call the specified protected resource. By default, acquireToken will attempt to fulfill the request silently, and perform an interactive login if needed or explicitly specified in the request. This overload uses an [AlertDialog](<a href="https://developer.android.com/guide/topics/ui/dialogs">https://developer.android.com/guide/topics/ui/dialogs</a>) when user interaction is required. This overload does not support any flow requiring a [token broker](<a href="https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker">https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker</a>).</p>
<p></p>
syntax: public void acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Required. </p>
name: refreshToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.</p>
<p>
<xrefsect id="deprecated_1_deprecated000002">
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="AuthenticationContext#acquireTokenByRefreshToken(String, String, AuthenticationCallback)"></xref> will be removed from the next major release. We don't recommend developers taking dependency on refresh token, ADAL will handle the cache lookup, and refresh the RT if necessary. </p>
</xrefdescription>
</xrefsect>
</p>
syntax: public void acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Required. </p>
name: refreshToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.</p>
<p>
<xrefsect id="deprecated_1_deprecated000003">
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="AuthenticationContext#acquireTokenByRefreshToken(String, String, AuthenticationCallback)"></xref> will be removed from the next major release. We don't recommend developers taking dependency on refresh token, ADAL will handle the cache lookup, and refresh the RT if necessary. </p>
</xrefdescription>
</xrefsect>
</p>
syntax: public void acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String,String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: Future<<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p>
<xrefsect id="deprecated_1_deprecated000001">
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>Use the <xref uid="com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,AuthenticationCallback<AuthenticationResult>)" data-throw-if-not-resolved="false" data-raw-source="acquireTokenSilentAsync"></xref> method. </p>
</xrefdescription>
</xrefsect>
</p>
syntax: public Future<AuthenticationResult> acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilent(String,String,String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>when true, access token is renewed using broker if available; otherwise, uses local refresh token </p>
name: forceRefresh
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,boolean,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>the actual saml assertion </p>
name: assertion
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>version of saml assertion being used </p>
name: assertionType
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/><<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>>
summary: >-
<p>This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public void acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String,@NonNull final String,final String,final String,final String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId)
name: acquireTokenSilentSync(String resource, String clientId, String userId)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
name: acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String,@Nullable String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
name: acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>when true, access token is renewed using broker if available; otherwise, uses local refresh token </p>
name: forceRefresh
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String,boolean)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
name: acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
nameWithType: AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
parameters:
- description: <p>the actual saml assertion </p>
name: assertion
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>version of saml assertion being used </p>
name: assertionType
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String,@NonNull final String,@NonNull final String,@NonNull final String,@NonNull final String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.cancelAuthenticationActivity(final int requestId)
name: cancelAuthenticationActivity(final int requestId)
nameWithType: AuthenticationContext.cancelAuthenticationActivity(final int requestId)
parameters:
- description: <p>Hash code value of your callback to cancel activity launch </p>
name: requestId
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>if failed to get the waiting request </p>
returns:
description: '<p>true: if there is a valid waiting request and cancel message sent successfully or if no waiting request exists. false: If the request could not be cancelled </p>'
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>Active authentication activity can be cancelled if it exists. It may not be cancelled if activity is not launched yet. RequestId is the hashcode of your AuthenticationCallback.</p>
<p></p>
syntax: public boolean cancelAuthenticationActivity(final int requestId)
uid: com.microsoft.aad.adal.AuthenticationContext.cancelAuthenticationActivity(final int)
- fullName: com.microsoft.aad.adal.AuthenticationContext.getAuthority()
name: getAuthority()
nameWithType: AuthenticationContext.getAuthority()
returns:
description: <p>Authority </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets authority that is used for this object of AuthenticationContext.</p>
<p></p>
syntax: public String getAuthority()
uid: com.microsoft.aad.adal.AuthenticationContext.getAuthority()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getBrokerUser()
name: getBrokerUser()
nameWithType: AuthenticationContext.getBrokerUser()
returns:
description: <p>Username </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets username for current broker user.</p>
<p></p>
syntax: public String getBrokerUser()
uid: com.microsoft.aad.adal.AuthenticationContext.getBrokerUser()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getBrokerUsers()
name: getBrokerUsers()
nameWithType: AuthenticationContext.getBrokerUsers()
exceptions:
- type: <xref href="IOException?alt=IOException&text=IOException" data-throw-if-not-resolved="False"/>
description: <p>if the broker returned an error response that indicates that it encountered an IOException while communicating with the authentication server. </p>
- type: <xref href="AuthenticatorException?alt=AuthenticatorException&text=AuthenticatorException" data-throw-if-not-resolved="False"/>
description: <p>if there was an error communicating with the authenticator or if the authenticator returned an invalid response. </p>
- type: <xref href="OperationCanceledException?alt=OperationCanceledException&text=OperationCanceledException" data-throw-if-not-resolved="False"/>
description: <p>if the request was canceled for any reason. </p>
returns:
description: <p>An array of <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> that haven been authenticated via broker(can be null). </p>
type: <xref href="com.microsoft.aad.adal.UserInfo?alt=com.microsoft.aad.adal.UserInfo&text=UserInfo" data-throw-if-not-resolved="False"/> []
summary: >-
<p>Gets user info from broker. This should not be called on main thread.</p>
<p></p>
syntax: public UserInfo [] getBrokerUsers()
uid: com.microsoft.aad.adal.AuthenticationContext.getBrokerUsers()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getCache()
name: getCache()
nameWithType: AuthenticationContext.getCache()
returns:
description: <p>ITokenCacheStore Current cache used </p>
type: <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>
summary: >-
<p>Returns referenced cache. You can use default cache, which uses SharedPreferencesFileManager and handles synchronization by itself.</p>
<p></p>
syntax: public ITokenCacheStore getCache()
uid: com.microsoft.aad.adal.AuthenticationContext.getCache()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getClientCapabilites()
name: getClientCapabilites()
nameWithType: AuthenticationContext.getClientCapabilites()
returns:
type: <xref href="List%3CString%3E?alt=List%3CString%3E&text=List%3CString%3E" data-throw-if-not-resolved="False"/>
syntax: public List<String> getClientCapabilites()
uid: com.microsoft.aad.adal.AuthenticationContext.getClientCapabilites()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getExtendedLifetimeEnabled()
name: getExtendedLifetimeEnabled()
nameWithType: AuthenticationContext.getExtendedLifetimeEnabled()
returns:
description: <p>True when ExtendedLifetime mode is enabled </p>
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets if the ExtendedLifetime mode is enabled.</p>
<p></p>
syntax: public boolean getExtendedLifetimeEnabled()
uid: com.microsoft.aad.adal.AuthenticationContext.getExtendedLifetimeEnabled()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getRedirectUriForBroker()
name: getRedirectUriForBroker()
nameWithType: AuthenticationContext.getRedirectUriForBroker()
returns:
description: <p>RedirectUri string to use for broker requests. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Get expected redirect Uri for your app to use in broker. You need to register this redirectUri in order to get token from Broker.</p>
<p></p>
syntax: public String getRedirectUriForBroker()
uid: com.microsoft.aad.adal.AuthenticationContext.getRedirectUriForBroker()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getRequestCorrelationId()
name: getRequestCorrelationId()
nameWithType: AuthenticationContext.getRequestCorrelationId()
returns:
description: <p>UUID </p>
type: <xref href="UUID?alt=UUID&text=UUID" data-throw-if-not-resolved="False"/>
summary: >-
<p>Get the CorrelationId set by user.</p>
<p></p>
syntax: public UUID getRequestCorrelationId()
uid: com.microsoft.aad.adal.AuthenticationContext.getRequestCorrelationId()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getValidateAuthority()
name: getValidateAuthority()
nameWithType: AuthenticationContext.getValidateAuthority()
returns:
description: <p>True If developer turn on the authority validation, false otherwise. </p>
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
syntax: public boolean getValidateAuthority()
uid: com.microsoft.aad.adal.AuthenticationContext.getValidateAuthority()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getVersionName()
name: getVersionName()
nameWithType: AuthenticationContext.getVersionName()
returns:
description: <p>The current SDK version. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Version name for ADAL not for the app itself.</p>
<p></p>
syntax: public static String getVersionName()
uid: com.microsoft.aad.adal.AuthenticationContext.getVersionName()
- fullName: com.microsoft.aad.adal.AuthenticationContext.mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
name: mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
nameWithType: AuthenticationContext.mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
parameters:
- description: <p>input claims passed on acquireToken call * </p>
name: claims
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- name: clientCapabilities
type: <xref href="final+List%3CString%3E?alt=final+List%3CString%3E&text=final+List%3CString%3E" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="JSONException?alt=JSONException&text=JSONException" data-throw-if-not-resolved="False"/>
description: <p>if input claims is an invalid JSON </p>
returns:
description: <p>merged claims with capabilities * </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Util method to merge <pre>
Sample input claim :
{
"userinfo": {
"given_name": {"essential": true},
"email": {"essential": true},
},
"id_token": {
"auth_time": {"essential": true},
}
}</pre></p>
<p>
<pre>Sample capabilities list : [CP1, CP2 CP3]</pre>
</p>
<p>
<pre>Output merged claims :
{
"userinfo": {
"given_name": {
"essential": true
},
"email": {
"essential": true
}
},
"id_token": {
"auth_time": {
"essential": true
}
},
"access_token": {
"xms_cc": {
"values": ["CP1", "CP2"]
}
}
}
</pre> * </p>
syntax: public static String mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
uid: com.microsoft.aad.adal.AuthenticationContext.mergeClaimsWithClientCapabilities(final String,final List<String>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.onActivityResult(final int requestCode, final int resultCode, final Intent data)
name: onActivityResult(final int requestCode, final int resultCode, final Intent data)
nameWithType: AuthenticationContext.onActivityResult(final int requestCode, final int resultCode, final Intent data)
parameters:
- description: <p>Request code provided at the start of the activity. </p>
name: requestCode
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
- description: <p>Result code set from the activity. </p>
name: resultCode
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Intent"></xref>
</p>
name: data
type: <xref href="final+Intent?alt=final+Intent&text=final+Intent" data-throw-if-not-resolved="False"/>
summary: >-
<p>This method wraps the implementation for onActivityResult at the related Activity class. This method is called at UI thread.</p>
<p></p>
syntax: public void onActivityResult(final int requestCode, final int resultCode, final Intent data)
uid: com.microsoft.aad.adal.AuthenticationContext.onActivityResult(final int,final int,final Intent)
- fullName: com.microsoft.aad.adal.AuthenticationContext.setClientCapabilites(List<String> clientCapabilites)
name: setClientCapabilites(List<String> clientCapabilites)
nameWithType: AuthenticationContext.setClientCapabilites(List<String> clientCapabilites)
parameters:
- name: clientCapabilites
type: <xref href="List%3CString%3E?alt=List%3CString%3E&text=List%3CString%3E" data-throw-if-not-resolved="False"/>
syntax: public void setClientCapabilites(List<String> clientCapabilites)
uid: com.microsoft.aad.adal.AuthenticationContext.setClientCapabilites(List<String>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
name: setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
nameWithType: AuthenticationContext.setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
parameters:
- description: <p>true if the ExtendedLifetime mode is on, false otherwise </p>
name: extendedLifetimeEnabled
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>The client need to set the flag to true explicitly to enable the ExtendedLifetime mode The default value of flag is false. ADAL will return the stale token when ExtendedLifetime mode is enabled and the server is down</p>
<p></p>