• File: AzureResourceOwner.php
  • Full Path: /var/www/crm_set/application/vendor/greew/oauth2-azure-provider/src/Provider/AzureResourceOwner.php
  • Date Modified: 09/21/2026 4:19 AM
  • File size: 790 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace Greew\OAuth2\Client\Provider;

use League\OAuth2\Client\Provider\ResourceOwnerInterface;

class AzureResourceOwner implements ResourceOwnerInterface
{
    /**
     * Raw response
     *
     * @var array
     */
    protected $response;

    /**
     * Creates new resource owner.
     *
     * @param array $response
     */
    public function __construct(array $response = array())
    {
        $this->response = $response;
    }

    /**
     * Get user id
     *
     * @return string|null
     */
    public function getId()
    {
        return $this->response['id'] ?: null;
    }

    /**
     * Return all of the owner details available as an array.
     *
     * @return array
     */
    public function toArray()
    {
        return $this->response;
    }
}