/** * Generates a new developer account authentication ticket for the specified tenant by supplying the defined refresh token information. * * @param int $developerAccountId Unique identifier of the developer account. * @param string $responseFields Use this field to include those fields which are not included by default. * @param DeveloperAdminUserAuthTicket $existingAuthTicket Properties of the authentication ticket to be used in developer account claims with the Mozu API. * @return MozuClient */ public static function refreshDeveloperAuthTicketClient($existingAuthTicket, $developerAccountId = null, $responseFields = null) { $url = DeveloperAdminUserAuthTicketUrl::refreshDeveloperAuthTicketUrl($developerAccountId, $responseFields); $mozuClient = new MozuClient(); $mozuClient->withResourceUrl($url)->withBody($existingAuthTicket); return $mozuClient; }
private static function getResourceRefreshUrl(UserAuthTicket $authTicket, $id = null) { switch ($authTicket->authenticationScope) { case AuthenticationScope::TENANT: return TenantAdminUserAuthTicketUrl::refreshAuthTicketUrl($id, null)->getUrl(); case AuthenticationScope::DEVELOEPR: return DeveloperAdminUserAuthTicketUrl::refreshDeveloperAuthTicketUrl($id, null)->getUrl(); default: throw new \Exception("Not Implemented"); } }