<commit_before><?php

/*
 * This file is part of the Active Collab Authentication project.
 *
 * (c) A51 doo <<EMAIL>>. All rights reserved.
 */

namespace ActiveCollab\Authentication;

use ActiveCollab\Authentication\AuthenticatedUser\AuthenticatedUserInterface;
use Psr\Http\Message\RequestInterface;

/**
 * @package ActiveCollab\Authentication
 */
interface AuthenticationInterface
{
    /**
     * Initialize authentication layer and see if we have a user who's already logged in.
     *
     * @param  RequestInterface                $request
     * @return AuthenticatedUserInterface|null
     */
    public function initialize(RequestInterface $request);

    /**
     * Authenticate with given credential agains authentication source.
     *
     * @param  RequestInterface           $request
     * @return AuthenticatedUserInterface
     */
    public function authorize(RequestInterface $request);
}<commit_msg>Add new argument to AuthenticationInterface::authorize()<commit_after><?php

/*
 * This file is part of the Active Collab Authentication project.
 *
 * (c) A51 doo <<EMAIL>>. All rights reserved.
 */

namespace ActiveCollab\Authentication;

use ActiveCollab\Authentication\AuthenticatedUser\AuthenticatedUserInterface;
use Psr\Http\Message\RequestInterface;

/**
 * @package ActiveCollab\Authentication
 */
interface AuthenticationInterface
{
    /**
     * Initialize authentication layer and see if we have a user who's already logged in.
     *
     * @param  RequestInterface                $request
     * @return AuthenticatedUserInterface|null
     */
    public function initialize(RequestInterface $request);

    /**
     * Authenticate with given credential agains authentication source.
     *
     * @param  RequestInterface           $request
     * @param  array                      $credentials
     * @return AuthenticatedUserInterface
     */
    public function authorize(RequestInterface $request, array $credentials = []);
}
{'fraction_non_alphanumeric': 0.08430675469781615, 'fraction_numerical': 0.002031488065007618, 'mean_word_length': 3.227467811158798, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '904499', 'n_tokens_mistral': 502, 'n_tokens_neox': 491, 'n_words': 143}