Skip to content
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

Merged
merged 4 commits into from Feb 15, 2019
Merged

Authorizer support to PHP #10

merged 4 commits into from Feb 15, 2019

Conversation

eddier
Copy link
Contributor

@eddier eddier commented Feb 1, 2019

Support for share on behalf of
Support for revoke on behalf of
Support for get authorized by

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.7%) to 81.146% when pulling 9cc5427 on eddier/authorizer into 6f156c3 on master.

@coveralls
Copy link

coveralls commented Feb 1, 2019

Coverage Status

Coverage decreased (-9.1%) to 76.749% when pulling 10a251d on eddier/authorizer into 6f156c3 on master.

Copy link

@fernviridian fernviridian left a 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);

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());

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?

Copy link

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());
Copy link

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.

* All rights reserved.
*
* @package Tozny\E3DB
* @copyright Copyright (c) 2017 Tozny, LLC (https://tozny.com)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: 2017 2019

namespace Tozny\E3DB\Types;

/**
* Full nformation about a specific E3DB client, including the client's
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/nformation/information

@eddier eddier merged commit c67a8b8 into master Feb 15, 2019
@eddier eddier deleted the eddier/authorizer branch February 15, 2019 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants