0
我使用ADAL验证到天青AD,它返回与权利要求的字典,所述键中的一个是用户是其成员的组,NSDictionary似乎有一个键的多个值,我如何访问个人值?
完整字典看起来像这样
2017-06-05 17:40:58.712 NWMobileTill[46676:3282242] userInfoStore Item all {
alg = none;
amr = (
pwd
);
aud = "042a00fc-b832-411f-xxxxxxxx";
exp = xxxxxxx;
groups = (
"xxx-9725-43f6-a502-xxxxx",
"38c5b3af-xxx-4b38-b180-xxxx"
);
iat = xxx;
ipaddr = "xx";
iss = "https://xxxxxxx/xxx-d61d-xxx-a949-0cb72eff23be/";
name = "POS Test";
nbf = xxx;
oid = "c44f91f2-xx-40bb-9624-xxx";
platf = 2;
sub = "xxxxx";
tid = "b5154a9e-xxx-4d55-a949-xxx";
typ = JWT;
"unique_name" = "[email protected]";
upn = "[email protected]";
ver = "1.0";
}
当我访问他们在NSDictionary中使用objectForKey如下
NSDictionary *jongel = [result.tokenCacheStoreItem.userInformation.allClaims objectForKey:@"groups"];
我得到多个条目类似这样的价值观,
2017-06-05 17:40:58.712 NWMobileTill[46676:3282242] Groups are (
"xx-9725-43f6-a502-xx",
"xx-d0dc-4b38-xx-17555db6f626"
)
我很困惑,我可以得到多个值,我如何访问每个单独的值?我碰巧把这个分配给NSDictionary,但我不知道这是否正确。我怎样才能得到这些个人参赛作品?
似乎是一个NSArray对我来说。 – Larme
你的意思是在NSDictionary里面的组是NSArray? –