anchor.diff:              {error, Error, Log}
       end.
   
  -        
  -    
  +
  +
   
   get_access_token_for(Session) ->
       {ok, #{access := #{token := AccessToken}}} = tts_session:get_token(Session),
  
positive.code: %% limitations under the License.
  %%
  -author("Bas Wegh, Bas.Wegh<at>kit.edu").
  
  -export([
           get_openid_provider_list/0,
           get_service_list_for/1,
           get_credential_list_for/1,
           get_credential_for/2,
           request_credential_for/4,
           revoke_credential_for/2,
  
           get_access_token_for/1,
           get_display_name_for/1,
  
           convert_to_json/2,
  
           start_full_debug/0,
           start_debug/1,
  
negative.code:     {ok, OpList}.
  
  
  get_service_list_for(Session) ->
      {ok, UserInfo} = tts_session:get_user_info(Session),
      #{ site := #{uid := UserId}} = UserInfo,
      {ok, ServiceList} = tts_service:get_list(UserId),
      {ok, ServiceList}.
  
  get_credential_list_for(Session) ->
      {ok, UserInfo} = tts_session:get_user_info(Session),
      #{ site := #{uid := UserId}} = UserInfo,
      {ok, CredentialList} = tts_credential:get_list(UserId),
      {ok, CredentialList}.
  
  
  request_credential_for(ServiceId, Session, Params, Interface) ->
      {ok, UserInfo} = tts_session:get_user_info(Session),
      {ok, Token} = tts_session:get_token(Session),
      {ok, SessionId} = tts_session:get_id(Session),
      true = tts_service:is_enabled(ServiceId),
      case
          tts_credential:request(ServiceId, UserInfo, Interface, Token, Params) of
          {ok, Credential, Log} ->
              [#{name := id, value:=CredId}|_] = Credential,
              lager:info("~p: requested credential ~p",
  