Access Token (http://tools.ietf.org/html/rfc6749#section-1.4)
Access tokens are credentials used to access protected resources. An
access token is a string representing an authorization issued to the
client. The string is usually opaque to the client. Tokens
represent specific scopes and durations of access, granted by the
resource owner, and enforced by the resource server and authorization
server.
Resource Owner (http://tools.ietf.org/html/rfc6749#section-1.1)
An entity capable of granting access to a protected resource.
When the resource owner is a person, it is referred to as an
end-user.
The highlights above are important (to me, at least) no matter service provider specific implementations. If the discussion is scoped to standardizing ONLY the access token, then service provider implementation specifics can be accommodated by appropriate interfaces. Personally, I feel like a lot of the API decisions for clients/server implementation assume a unified authorization / resource server and this leads to cloudiness in responsibility but if I get an access token handed to me, I should be able to determine (from whatever concretion) those highlighted concepts.
I like the AccessToken
above with a few adjustments:
string
, but wrapping it reifies the abstraction beyond some arbitrary text. The key here though is that we're talking about an entity that is uniquely addressable. We can take the spec a step-further by standardizing what that means. An example would serve well here (I'll bake something).Authorization: {:type} {:value}
)/edit I included the reference material above to help guide my own writing more than anything, not as a presumption that folks are unaware. My perceived tone when writing is a problem and wanted to make sure I wasn't coming across as offensive.
On Aug 21, 2015, at 10:33 AM, Alex Bilbie <he...@alexbilbie.com> wrote:So Frank sent this tweet out earlier - https://twitter.com/frankdejonge/status/634727793805406209A number of people joined Frank in discussing this proposal and to sum up roughly where the conversation led to what is being proposed is a value object class that describes an access token that can be used by PHP packages that have to consume or produce access tokens.I created a very quick first attempt here: https://gist.github.com/alexbilbie/833024da674ecc7e5e61Frank originally proposed that it becomes a PSR; I'm inclined to disagree as I'm sure we'd all much rather have something sooner than it would otherwise take to get a proposal through the FIG.
I personally think an OAuth namespace should be minted and as the League has some of the most popular OAuth-related packages available we [the League] sponsor/host the repository. Having said that if the consensus is going down the FIG-route I'd be more than happy to get involved.Some other thoughts/ideas I have:* The classes needs to be kept as simple and generic as possible as identity provider implements OAuth differently
* After instantiation the object should be immutable (i.e. no setter methods aside from the constructor)
* It might be interesting to subclass the main AccessToken class with provider specific classes - for example "FacebookAccessToken" and we have some sort of interface to go along with it that has a method called `refresh()` with which you could pass the FacebookAccessToken instance into the interface implementation and it can handle refreshing the access token and returning a new instance…
--
You received this message because you are subscribed to the Google Groups "thephpleague" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thephpleague...@googlegroups.com.
To post to this group, send email to thephp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thephpleague/7479b936-959f-48b8-9f39-89c68675e3b8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thephpleague/CAGOJM6JAPKQFYLBWEQqwPibT96YVE_Lk_hPaopK2jVjZvmG6qA%40mail.gmail.com.
* An optional list of scopes (returned from the server in the form of space-seperated list)
I've never seen this come back in a token response. Does it exist as an option in the OAuth spec?
On Aug 21, 2015, at 2:28 PM, Matt Frost <mfrost...@gmail.com> wrote:I could see adding interfaces for AccessToken, RefreshToken, Temporary Token to handle some of the differences and provide some flexibility; I'm sure there is a use case for having the scope and expiration as attributes of a Token, I just don't can't think of one.
--
You received this message because you are subscribed to the Google Groups "thephpleague" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thephpleague...@googlegroups.com.
To post to this group, send email to thephp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thephpleague/CAGKidOSyqt4T8zbe2%2BB7tJKS97hDQrvJdMMJv3Utg6c29Kr%3DRg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thephpleague/CAGOJM6%2B2y8_VLWneF%2B_ppaH3DjiMHFu6VvU0NUgrpDAXO1ho8A%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to thephpleague+unsubscribe@googlegroups.com.
To post to this group, send email to thephp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thephpleague/CAGKidOSyqt4T8zbe2%2BB7tJKS97hDQrvJdMMJv3Utg6c29Kr%3DRg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "thephpleague" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thephpleague+unsubscribe@googlegroups.com.