New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorizer support to PHP #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small things, otherwise LGTM!
php/Client.php
Outdated
|
||
$allow = new \stdClass(); | ||
$allow->allow = [['read' => new \stdClass()]]; | ||
$path = $this->conn->uri('v1', 'storage', 'policy',$writer_id, $writer_id, $reader_id, $record_type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space between comma
php/Client.php
Outdated
} catch (RequestException $re) { | ||
throw new NotFoundException("Could not retrieve data"); | ||
} | ||
return json_decode($resp->getBody()->getContents()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the php SDK do anything with types, or is it just throwing decoded json bodies around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is doing types:
https://github.com/tozny/e3db-php/tree/master/php/Types
I agree for consistency this should return a new type rather than a stdClass
instance.
php/Client.php
Outdated
} catch (RequestException $re) { | ||
throw new NotFoundException("Could not retrieve data"); | ||
} | ||
return json_decode($resp->getBody()->getContents()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is doing types:
https://github.com/tozny/e3db-php/tree/master/php/Types
I agree for consistency this should return a new type rather than a stdClass
instance.
php/Types/AuthorizedBy.php
Outdated
* All rights reserved. | ||
* | ||
* @package Tozny\E3DB | ||
* @copyright Copyright (c) 2017 Tozny, LLC (https://tozny.com) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: 2017 2019
php/Types/AuthorizedBy.php
Outdated
namespace Tozny\E3DB\Types; | ||
|
||
/** | ||
* Full nformation about a specific E3DB client, including the client's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/nformation/information
Support for share on behalf of
Support for revoke on behalf of
Support for get authorized by