anchor.diff:  		Reason :: term().
   validate_user(Info, Directory, DirectoryData,
   		ValidUsers, ValidGroups, #{"email" := Email}) when is_list(Email) ->
  -erlang:display({?MODULE, ?LINE}),
   	case user_accepted(Email, ValidUsers) of
   		true ->
  -erlang:display({?MODULE, ?LINE}),
   			{yes, Email};
   		false ->
  -erlang:display({?MODULE, ?LINE}),
   			case user_group_check(Info, Email,
   					ValidGroups, Directory,  DirectoryData) of
   				true ->
  -erlang:display({?MODULE, ?LINE}),
   					{authorized, Email};
   				false ->
  -erlang:display({?MODULE, ?LINE}),
   					authorization_required(DirectoryData)
   			end
   	end;
   validate_user(Info, Directory, DirectoryData,
   		ValidUsers, ValidGroups, #{"preferred_username" := PrefUserName})
   		when is_list(PrefUserName) ->
  -erlang:display({?MODULE, ?LINE, PrefUserName, ValidUsers}),
   	case user_accepted(PrefUserName, ValidUsers) of
   		true ->
  -erlang:display({?MODULE, ?LINE}),
   			{yes, PrefUserName};
   		false ->
  -erlang:display({?MODULE, ?LINE}),
   			case user_group_check(Info, PrefUserName,
   					ValidGroups, Directory, DirectoryData) of
   				true ->
  -erlang:display({?MODULE, ?LINE}),
   					{authorized, PrefUserName};
   				_ ->
  -erlang:display({?MODULE, ?LINE}),
   					authorization_required(DirectoryData)
   			end
   	end.
  
positive.code: require1(Info, Directory, DirectoryData, ValidUsers, ValidGroups,
  		EncodedHeader, EncodedPayload, EncodedSignature)
  		when is_list(EncodedHeader), is_list(EncodedPayload), is_list(EncodedSignature) ->
  erlang:display({?MODULE, ?LINE}),
  	case validate_header(EncodedHeader) of
  	{valid, _DecodedHeader} ->
  erlang:display({?MODULE, ?LINE}),
  		case validate_payload(EncodedPayload) of
  		{valid, DecodedPayload} ->
  erlang:display({?MODULE, ?LINE}),
  			case validate_cert(EncodedHeader, EncodedPayload, EncodedSignature) of
  					authenticated ->
  erlang:display({?MODULE, ?LINE}),
  						validate_user(Info, Directory, DirectoryData,
  								ValidUsers, ValidGroups, DecodedPayload);
  					{error, _Reason} ->
  erlang:display({?MODULE, ?LINE}),
  						authorization_required(DirectoryData)
  			end;
  		{error, _Reason} ->
  
negative.code: do(#mod{data = Data} = Info) ->
  	case lists:keyfind(status, 1, Data) of
  		false ->
  			case lists:keyfind(response, 1, Data) of
  				false ->
  					do1(Data, Info);
  				_ ->
  					{proceed, Data}
  			end;
  		{_StatusCode, _PhraseArgs, _Reason} ->
  			{proceed, Data}
  	end.
  do1(Data, #mod{config_db = ConfigDb,
  		request_uri= RequestUri} = Info) ->
  	Path = mod_alias:path(Data, ConfigDb, RequestUri),
  	case directory_path(Path, ConfigDb) of
  		{yes, {Directory, DirectoryData}} ->
  			case proplists:get_value(auth_type, DirectoryData) of
  				undefined ->
  					{proceed, Data};
  				none ->
  					{proceed, Data};
  				AuthType ->
  					handle_auth(Info, Directory, DirectoryData, AuthType)
  			end;
  		no ->
  			{proceed, Data}
  	end.
  
  