Totez Colbz
Friday, April 29, 2016
Friday, April 22, 2016
OAuth2 proof of concept
Ok. It took me 7 hours and 15 minutes, but I have completed a proof of concept of OAuth2 for BLB.
Our overall guide through this disaster is a google article:
https://developer.chrome.com/apps/app_identity
I used that guide because I call chrome.identity.launchWebAuthFlow in my chrome extension.
This will be our guide for properly contacting our WordPress OAuth2 plugin.
https://wp-oauth.com/kb/access-the-resource-server/
Install the OAuth2 plugin:
https://wordpress.org/plugins/oauth2-provider/
Configure the plugin:
On the Advanced Configuration tab, I ticked all the grant types while debugging.
On the Clients tab, add a new client.
- Name the client whatever you want
- The client must have a very specific redirect URL
- Describe the client it however you want
https://<appid>.chromiumapp.org/<scope>
where <appid> is the application id of your application
and <scope> is the scope you invent as needed
<appid> must match the ID of your chrome app or extension. It's shown either in the app store (apparently) or on the Chrome > Settings > Extensions > Your Extension > ID field.
The WordPress OAuth2 plugin will create a Oauth2 client ID in response (let's call this <OCID>).
Configure your Chrome extension to use OAuth by updating the manifest:
https://developer.chrome.com/apps/app_identity#update_manifest
Call Chrome's handy method
https://developer.chrome.com/apps/identity#method-launchWebAuthFlow
You have to get the parameters to this method just right.
Here's some javascript:
var client_id = '<OCID>';
var redirectUri = chrome.identity.getRedirectURL("<scope>");
console.log("redirectUri: "+redirectUri);
var auth_url = "https://yoursite.com/oauth/authorize?response_type=token&client_id=" + client_id + "&redirect_uri=" + redirectUri;
Notice the endpoint is per the WordPress OAuth documentation: /oath/authorize?
Notice the variables are per the google documentation:
- response_type=token
- client_id
- redirect_uri
This should cause the callback provided to launchWebAuthFlow to be called....back.
When the callback is called, it will include the token.
The token will be provided by the client to the server. The server will use the token to authenticate the client's requests.
You can use I.E. to hit up any client calls to your server.
Other helpful explanations:
https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2
https://developer.vimeo.com/api/authentication
https://dev.twitter.com/oauth/overview/authorizing-requests
https://developers.google.com/youtube/v3/guides/auth/server-side-web-apps#Obtaining_Access_Tokens
Thursday, March 24, 2016
good ui design is cool
http://mono.company/journal/design-practice/the-10-commandments-of-good-form-design-on-the-web/
Monday, March 14, 2016
Spreadsheets
You know you've spent too much time in spreadsheets when while editing a sentence an email, you randomly insert a newline because you want to commit your edit.
-Colbz
-Colbz
Thursday, January 28, 2016
Scrum Review: Sprint Direction
We're sprinting, right?
There's that moment where you actually don't want to show your product to the product owner for fear that he will change something.
You don't want to stop sprinting.
Rather, you don't want to have to grab your sprint-mates' attention, stop, tell everyone you're running somewhere else, a few of you turn around, run back a 200 yards, and then start heading forward again toward the new destination.
In the end, it's best to stick to the program and go ahead with the demo. Doesn't matter if you're doing a Sprint Review demo or an informal mid-sprint demo. It's worth making sure you're running the correct direction because you'd rather backtrack 200 yards, than the entire marathon.
There's that moment where you actually don't want to show your product to the product owner for fear that he will change something.
You don't want to stop sprinting.
Rather, you don't want to have to grab your sprint-mates' attention, stop, tell everyone you're running somewhere else, a few of you turn around, run back a 200 yards, and then start heading forward again toward the new destination.
In the end, it's best to stick to the program and go ahead with the demo. Doesn't matter if you're doing a Sprint Review demo or an informal mid-sprint demo. It's worth making sure you're running the correct direction because you'd rather backtrack 200 yards, than the entire marathon.
Monday, January 18, 2016
More good requirements
Use cases are good for document requirements. Just remember to consider the following about your use case:
- Document every possible condition for any procedural step
- Explain how to handle the branches created by conditions
- Keep your use case specific to one actor's desired action
- Documenting pre-conditions and post-conditions is helpful.
Wednesday, January 13, 2016
Make your requirements awesome
Means and Ends
Requirements must be written with concern to the ends, not the means.
If requirements explain steps taken, they should describe the desired end workflow.
Functionality vs. Design
Requirements should describe the desired functionality, rather than describe how to support the desired functionality.
What, when, where who, why, and how?
Requirements should describe the what, when, where, and who.
Requirements documentation can even describe the why.
Requirements cannot describe the how.
Dangerous territory: mockups
A picture is worth a thousand words.
A mockup is worth hundreds of requirements.
If you have to use mockups, don't.
If you still have to use them, the elements of the mockup that are actual requirements must be identified, highlighted, or listed in some fashion. Otherwise, you're going to be taking the long train to annoying-bug-ville.
Subscribe to:
Posts (Atom)