Create SSO Users, Adding To Group, Subscribing to Category via API

Hello, in ESN Greece (there is a cas server), so after the authentication, the user info is available in our PHP app, which next it will redirect back to discourse. (SSOhelper)

fields you may send back to discourse are

   'username' => string,
    'name'     => string,
    'avatar_url' =>  string->url,
    'add_groups' => discourse group names seperated with comma,
    'remove_groups' => discourse group names seperated with comma

About some categories based on Group you may edit your Groups @ discourse level and set them what categories to watch by default