Replies: 5 comments 18 replies
-
What type of methods would you like to see in that controller? Most of the auth token authentication is handled within the |
Beta Was this translation helpful? Give feedback.
-
@sammyskills It's not currently on my todo list. Too many other pots on the fire at the moment. One thing we'll have to do is force a response format with the api endpoints, so we should use JSON, and maybe even the JSON-API spec?
That's part of what would need to be determined while we're implementing this. The only thing that are top of mind to me are:
I would add a configuration option for
That really depends on the apps setup. As I've said there are two different flows we should account for - both of them already with explanations in the guides. I can see a use for register/login/logout API endpoints, though, that would basically be the same logic as the existing elements, but would return JSON.
The argument in the the
The only way to "log someone out" of using an access token is to revoke the access token |
Beta Was this translation helpful? Give feedback.
-
I understand the initial confusion now and think that an authentication API for access tokens may not be worthwhile. It would be difficult to implement while considering all aspects such as that some developers may want to utilize the access tokens for third-party API authorization and not authentication. So we should leave it to developers on how they would like to use the access tokens. However, I don't want to give up on the idea of an out of box RESTful API for authentication. Is there a plan for implementing JWT at some point? That would work much better for this use case. Opinions? |
Beta Was this translation helpful? Give feedback.
-
I am having trouble wrapping my head around the architecture of Shield. Let's anticipate I (and/or others) would like to use CodeIgniter Shield in their back-end that is consumed by a mobile app or other front-end service. For example, mobile app sends email and password credentials to an endpoint - am I forced to utilize the session authenticator to check email/pass credentials (when wanting to use other authenticators such as access tokens or JWT (#195)? For example, in the docs, the |
Beta Was this translation helpful? Give feedback.
-
No, you're not forced to use Session authenticator, but if you don't you'll need to roll your own validation of the user for login/registration as it currently stands. The process is this:
I get that it seems strange to use both at first, but they each have their different use cases in what they protect and how they function. |
Beta Was this translation helpful? Give feedback.
-
Shield currently provides two methods of authentication, session and access tokens. There is already boilerplate controllers for authenticating via session. I think there could be interest in having a controller available "out of box" to provide a proper RESTful API for access token authentication.
Beta Was this translation helpful? Give feedback.
All reactions