GithubHelp home page GithubHelp logo

Comments (9)

JesseFarebro avatar JesseFarebro commented on July 4, 2024

The 'auto_approve' is a field in your database in the table oauth_clients I
believe so just set that to the desired value. The ClientIntetface doesn't
provide any way of changing this value it should be set when the client is
first made.
On May 12, 2013 6:32 AM, "Alex Bouma" [email protected] wrote:

I started implementing the OAuth2 server by your tutorial (
https://github.com/php-loep/oauth2-server/wiki/Developing-an-OAuth-2.0-authorization-server)
and found out that something is not right (or I need glasses).

The problem can be found here
https://github.com/php-loep/oauth2-server/wiki/Developing-an-OAuth-2.0-authorization-server#create-an-oauth-controllerwhen you need to create the
authorise endpoint. There is spoken of a auto_approve parameter in
client_details however it is nowhere to be found!

I checked the ClientInterface who is (that I believe) responsible for
providing that data. I looked at the docs at
https://github.com/php-loep/oauth2-server/blob/master/src/League/OAuth2/Server/Storage/ClientInterface.php#L38but there is also not spoken of an
auto_approve.

I hope this is a valid problem and not me having a bad day =]


Reply to this email directly or view it on GitHubhttps://github.com//issues/55
.

from oauth2-server.

stayallive avatar stayallive commented on July 4, 2024

I know that. But I do not wish to change it but retrieve at as in the tutorial!

from oauth2-server.

JesseFarebro avatar JesseFarebro commented on July 4, 2024

If your following that tutorial you should see its retrieved from the
associative array called params. When the request is first made
$params['client_details'] is populated with the information. So to access
it you would therefore use $params['client_details']['auto_approve']. Sorry
for the lack of formating I'm on my phone.
On May 12, 2013 3:46 PM, "Alex Bouma" [email protected] wrote:

I know that. But I do not wish to change it but retrieve at as in the
tutorial!


Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-17785984
.

from oauth2-server.

stayallive avatar stayallive commented on July 4, 2024

Yeah I have seen that too :) and I also var_dumped that array... No
auto_approve to be found! So I went digging and found out that the
ClientInterface is responsible for getting that info except it doesn't!? Or
should that come from somewhere else. TL;DR The auto_approve is not set on
the $params['client_details']

NP I can read it fine without fancy formatting :)

Op 12 mei 2013 om 23:52 heeft Jesse Farebrother [email protected]
het volgende geschreven:

If your following that tutorial you should see its retrieved from the
associative array called params. When the request is first made
$params['client_details'] is populated with the information. So to access
it you would therefore use $params['client_details']['auto_approve']. Sorry
for the lack of formating I'm on my phone.
On May 12, 2013 3:46 PM, "Alex Bouma" [email protected] wrote:

I know that. But I do not wish to change it but retrieve at as in the
tutorial!


Reply to this email directly or view it on GitHub<
https://github.com/php-loep/oauth2-server/issues/55#issuecomment-17785984>
.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/55#issuecomment-17786079
.

from oauth2-server.

JesseFarebro avatar JesseFarebro commented on July 4, 2024

Well client interface just provides a interface for the storage model. Have
you tried looking to see what the default Client storage model does. It can
be located in /Leage/OAuth2/Server/Storage/PDO/Client.php I believe.
On May 12, 2013 3:57 PM, "Alex Bouma" [email protected] wrote:

Yeah I have seen that too :) and I also var_dumped that array... No
auto_approve to be found! So I went digging and found out that the
ClientInterface is responsible for getting that info except it doesn't!?
Or
should that come from somewhere else. TL;DR The auto_approve is not set on
the $params['client_details']

NP I can read it fine without fancy formatting :)

Op 12 mei 2013 om 23:52 heeft Jesse Farebrother [email protected]

het volgende geschreven:

If your following that tutorial you should see its retrieved from the
associative array called params. When the request is first made
$params['client_details'] is populated with the information. So to access
it you would therefore use $params['client_details']['auto_approve'].
Sorry
for the lack of formating I'm on my phone.
On May 12, 2013 3:46 PM, "Alex Bouma" [email protected] wrote:

I know that. But I do not wish to change it but retrieve at as in the
tutorial!


Reply to this email directly or view it on GitHub<
https://github.com/php-loep/oauth2-server/issues/55#issuecomment-17785984>

.


Reply to this email directly or view it on
GitHub<
https://github.com/php-loep/oauth2-server/issues/55#issuecomment-17786079>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-17786140
.

from oauth2-server.

JesseFarebro avatar JesseFarebro commented on July 4, 2024

Yeah it looks like in the default model that I said in my last post doesn't include the client_details however that would be very easy to implement just modify the SQL queries in your Client model and return an extra key in the associative array call it what ever you'd like.

from oauth2-server.

stayallive avatar stayallive commented on July 4, 2024

Yeah I can fix it but I think it should be fixed in the source too because im not the only one using the default PDO implementations I suppose. I can write You an pull request if wanted. If not please do fix so I can use the lib without modifying or implementing the storage models myself. :)

from oauth2-server.

alexbilbie avatar alexbilbie commented on July 4, 2024

This is an oversight on my part. I will update the wiki and PDO driver with how to make use of the auto-approve feature.

Emailing from my iPhone like a BOSS

On 12 May 2013, at 15:05, Alex Bouma [email protected] wrote:

Yeah I can fix it but I think it should be fixed in the source top because im not the only one using the default PDO implementations I suppose. I can write You an pull request if wanted. If not please do fix so I can use the lib without modifying or implementing the storage models myself. :)


Reply to this email directly or view it on GitHub.

from oauth2-server.

alexbilbie avatar alexbilbie commented on July 4, 2024

Closing this because it has been fixed in the imminent 3.0

from oauth2-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.