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

Assert that variables are correct when creating an ApiContext with code. #35

Closed
qurben opened this issue Aug 10, 2017 · 5 comments
Closed
Assignees
Projects
Milestone

Comments

@qurben
Copy link
Contributor

qurben commented Aug 10, 2017

How to Reproduce

  1. Create an ApiContext with an invalid API Key, description or IP address

What Should Happen

  1. The process fails before any API calls are made because of the invalid data

What Happens

  1. An API call is made, and API returns an error saying that API Key / description / IP address was invalid
@qurben qurben self-assigned this Aug 10, 2017
@dnl-blkv
Copy link
Contributor

@qurben I don't get what this issue is about. Could you please provide some details? Such as: How To Reproduce / What Should Happen / What Happens

@dnl-blkv
Copy link
Contributor

Or is it done already? :)

@qurben
Copy link
Contributor Author

qurben commented Aug 23, 2017

@dnl-blkv Updated the description

@qurben qurben removed their assignment Aug 23, 2017
@dnl-blkv
Copy link
Contributor

@qurben I would say:

  • Validating IP address is good, since IPv4 / IPv6 are standards
  • Validating API keys is OK since those aren't expected to change match, and if they change it will be an event which won't go unnoticed
  • I would probably NOT validate description because it is not a critical piece of data, and our standard for description may change breaking older versions of SDKs. We do not want this.

@qurben
Copy link
Contributor Author

qurben commented Aug 23, 2017

@dnl-blkv If you provide a description which is not a string or is an empty string the /device-server call will fail. A check for this would be pretty trivial.

@OGKevin OGKevin self-assigned this Nov 12, 2017
@OGKevin OGKevin added this to the 0.13.0 milestone Nov 21, 2017
@OGKevin OGKevin modified the milestones: 0.13.0, 0.13.5 Mar 27, 2018
@OGKevin OGKevin added this to To do in 1.0.0 - SDK via automation Mar 27, 2018
@OGKevin OGKevin moved this from To do to pending review in 1.0.0 - SDK Apr 7, 2018
OGKevin added a commit that referenced this issue Apr 9, 2018
OGKevin added a commit that referenced this issue Apr 9, 2018
OGKevin added a commit that referenced this issue Apr 9, 2018
OGKevin added a commit that referenced this issue Apr 9, 2018
…ontext_bunq/sdk_php#35

Assert values are correct for api context #35
@OGKevin OGKevin closed this as completed Apr 9, 2018
1.0.0 - SDK automation moved this from pending review to Done Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.0.0 - SDK
  
Done
Development

No branches or pull requests

3 participants