anchor.diff:  -export([get_user_info/1]).
   -export([get_display_name/1]).
   
  +-export([set_iss_sub/3]).
   -export([get_iss_sub/1]).
   
   -export([get_used_redirect/1]).
  
positive.code: handle_call(get_iss_sub, _From,
              #state{max_age=MA, iss=Issuer, sub=Subject}=State) ->
      {reply, {ok, Issuer, Subject}, State, MA};
  handle_call({set_token, #{id := #{claims :=
                                        #{iss := Issuer, sub := Subject }}
                           } = Token0}, _From, #state{max_age=MA}=State) ->
      UserInfo = maps:get(user_info, Token0, undefined),
      TokenKeys = [access, id, refres],
      Token = maps:with(TokenKeys, Token0),
      {reply, ok, State#state{token=Token, oidc_info=UserInfo, iss=Issuer,
                              sub=Subject}, MA};
  handle_call(get_token, _From, #state{max_age=MA, token=Token}=State) ->
      {reply, {ok, Token}, State, MA};
  handle_call({set_user_info, UserInfo}, _From, #state{max_age=MA} = State) ->
      {reply, ok, State#state{user_info=UserInfo}, MA};
  handle_call(get_user_info, _From, #state{max_age=MA,
                                           user_info=UserInfo, oidc_info=OidcInfo} =State) ->
      LocalInfo = maps:get(oidc, UserInfo, #{}),
      Info = maps:put(oidc, maps:merge(LocalInfo, OidcInfo), UserInfo),
      {reply, {ok, Info}, State, MA};
  
negative.code:     {ok, Issuer :: binary(), Subject :: binary()}.
  get_iss_sub( Pid) ->
      gen_server:call(Pid, get_iss_sub).
  
  -spec set_iss_sub(Issuer :: binary(), Subject::binary(), Pid :: pid()) -> ok.
  set_iss_sub(Issuer, Subject, Pid) ->
      gen_server:call(Pid, {set_iss_sub, Issuer, Subject}).
  
  -spec is_logged_in(Pid :: pid()) -> true | false.
  is_logged_in(Pid) ->
  