FOSOAuthServerBundle icon indicating copy to clipboard operation
FOSOAuthServerBundle copied to clipboard

Disable authorization form

Open pierrre opened this issue 14 years ago • 3 comments

Hi,

Is it possible to disable the authorization form? It does not make sense to have this form inside my own app.

Thanks!

pierrre avatar Jul 19 '12 09:07 pierrre

I think you can use the event listener (see doc) and always set true on onPreAuthorizationProcess event:

<?php
namespace Acme\MyBundle\EventListener;

use FOS\OAuthServerBundle\Event\OAuthEvent;

class OAuthEventListener
{
    public function onPreAuthorizationProcess(OAuthEvent $event)
    {
        $event->setAuthorizedClient( true );
    }
}

Spomky avatar Sep 23 '12 16:09 Spomky

Hi,

I think you should look at the grant types: "password" or "client_credentials"

It allows you to send your users login/password to your oauthserver and receive a Token. Only your own Clients should be able to use those grant types.

3rd Party apps should use the "authorization_code" or "token" grant_type. (So they don't deal with your users passwords)

Hope this will help you

jmig avatar Oct 04 '12 18:10 jmig

Then again, @jmig is right. Look at the grant types and the different "flows".

willdurand avatar Nov 21 '12 02:11 willdurand