@@ -26,16 +26,15 @@ public SlackAuthenticationOptions()
26
26
TokenEndpoint = SlackAuthenticationDefaults . TokenEndpoint ;
27
27
UserInformationEndpoint = SlackAuthenticationDefaults . UserInformationEndpoint ;
28
28
29
- ClaimActions . MapJsonKey ( ClaimTypes . NameIdentifier , "user_id" ) ;
30
- ClaimActions . MapJsonKey ( ClaimTypes . Name , "user" ) ;
31
- ClaimActions . MapJsonKey ( "urn:slack:team_id" , "team_id" ) ;
32
- ClaimActions . MapJsonKey ( "urn:slack:team_name" , "team" ) ;
33
- ClaimActions . MapJsonKey ( "urn:slack:team_url" , "url" ) ;
34
- ClaimActions . MapCustomJson ( "urn:slack:bot:user_id" , user => user [ "bot" ] ? . Value < string > ( "bot_user_id" ) ) ;
35
- ClaimActions . MapCustomJson ( "urn:slack:bot:access_token" , user => user [ "bot" ] ? . Value < string > ( "bot_access_token" ) ) ;
36
- ClaimActions . MapCustomJson ( "urn:slack:webhook:channel" , user => user [ "incoming_webhook" ] ? . Value < string > ( "channel" ) ) ;
37
- ClaimActions . MapCustomJson ( "urn:slack:webhook:url" , user => user [ "incoming_webhook" ] ? . Value < string > ( "url" ) ) ;
38
- ClaimActions . MapCustomJson ( "urn:slack:webhook:configuration_url" , user => user [ "incoming_webhook" ] ? . Value < string > ( "configuration_url" ) ) ;
29
+ ClaimActions . MapCustomJson ( ClaimTypes . NameIdentifier , user =>
30
+ string . Concat ( user [ "team" ] [ "id" ] , "|" , user [ "user" ] [ "id" ] ) ) ;
31
+ ClaimActions . MapJsonSubKey ( ClaimTypes . Name , "user" , "name" ) ;
32
+ ClaimActions . MapJsonSubKey ( ClaimTypes . Email , "user" , "email" ) ;
33
+ ClaimActions . MapJsonSubKey ( "urn:slack:user_id" , "user" , "id" ) ;
34
+ ClaimActions . MapJsonSubKey ( "urn:slack:team_id" , "team" , "id" ) ;
35
+ ClaimActions . MapJsonSubKey ( "urn:slack:team_name" , "team" , "name" ) ;
36
+
37
+ Scope . Add ( "identity.basic" ) ;
39
38
}
40
39
}
41
40
}
0 commit comments