One Hat Cyber Team
Your IP :
18.189.178.124
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
globify.live
/
fns
/
hybridauth
/
Provider
/
View File Name :
AutoDesk.php
<?php /** * Hybridauth * https://hybridauth.github.io | https://github.com/hybridauth/hybridauth * (c) 2020 Hybridauth authors | https://hybridauth.github.io/license.html */ namespace Hybridauth\Provider; use Hybridauth\Adapter\OAuth2; use Hybridauth\Exception\UnexpectedApiResponseException; use Hybridauth\Data; use Hybridauth\User; /** * AutoDesk OAuth2 provider adapter. */ class AutoDesk extends OAuth2 { /** * {@inheritdoc} */ protected $scope = 'data:read'; /** * {@inheritdoc} */ protected $apiBaseUrl = 'https://developer.api.autodesk.com/'; /** * {@inheritdoc} */ protected $authorizeUrl = 'https://developer.api.autodesk.com/authentication/v1/authorize'; /** * {@inheritdoc} */ protected $accessTokenUrl = 'https://developer.api.autodesk.com/authentication/v1/gettoken'; /** * {@inheritdoc} */ protected $refreshTokenUrl = 'https://developer.api.autodesk.com/authentication/v1/refreshtoken'; /** * {@inheritdoc} */ protected $apiDocumentation = 'https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/overview/'; /** * {@inheritdoc} */ protected function initialize() { parent::initialize(); if ($this->isRefreshTokenAvailable()) { $this->tokenRefreshParameters += [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, 'grant_type' => 'refresh_token', ]; } } /** * {@inheritdoc} * * See: https://forge.autodesk.com/en/docs/oauth/v2/reference/http/users-@me-GET/ */ public function getUserProfile() { $response = $this->apiRequest('userprofile/v1/users/@me'); $collection = new Data\Collection($response); $userProfile = new User\Profile(); $userProfile->identifier = $collection->get('userId'); $userProfile->displayName = $collection->get('firstName') .' '. $collection->get('lastName'); $userProfile->firstName = $collection->get('firstName'); $userProfile->lastName = $collection->get('lastName'); $userProfile->email = $collection->get('emailId'); $userProfile->language = $collection->get('language'); $userProfile->webSiteURL = $collection->get('websiteUrl'); $userProfile->photoURL = $collection->filter('profileImages')->get('sizeX360'); return $userProfile; } }