get:claims
.user_id : Id
: The Id of the user for whom the claims are requested.claims : String[]
: The name of the claims requested about the user.Map<String, Object>
which contains all the claims requested. All keys which are not part of the input claims: String[]
will be ignored.1global class MyClaimCallable implements Callable {2 global Object call(String action, Map<String, Object> args) {3 if (action == 'get:claims') {4 User u = [SELECT Email, Custom_Field__c FROM User WHERE Id =: (Id) args.get('user_id') ];5 return new Map<String, Object> {6 'sub' => u.Email,7 'custom_field' => u.Custom_Field__c8 };9 }10 return null;11 }12}