Giter Site home page Giter Site logo

api-key-bundle's Introduction

Deprecated Library

The key benefits of the dump() method are better implemented and maintained in Ladybug: PHP 5.3+ Extensible Dumper. It's suggested that you use that library.

This code will no longer be supported.

api-key-bundle's People

Contributors

calvera avatar cordoval avatar cryptiklemur avatar gepo avatar k-k avatar k-phoen avatar l0rd59 avatar ladever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-key-bundle's Issues

Installation problem

Hi, followed your instructions for installation and have hit a problems
I am getting error that no authenication listener is registered for firewall auth
Any ideas ?

ServiceNotFoundException being thrown

I'm getting the following exception:

ServiceNotFoundException: The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.fos_userbundle".

When using the following security configuration:

providers:
    db:
        id: uecode.api_key.provider.user_provider

Is there more configuration I'm missing? Because I'm migrating from the FOSUserBundle to this, and it seems a bit... underwhelming in the documentation.

No Authentication Provider found for token of class "ApiKeyUserToken".

Hi,

I've some trouble with your bundle.

I've got this error : No Authentication Provider found for token of class "Uecode\Bundle\ApiKeyBundle\Security\Authentication\Token\ApiKeyUserToken".

My config.yml :

#FOS User Configuration
fos_user:
   db_driver: orm
   firewall_name: auth
   user_class: LIG\Bundle\UserBundle\Entity\UserApi

My security.yml :

security:
    providers:
        db:
            id: uecode.api_key.provider.user_provider
        fos_userbundle:
            id: fos_user.user_provider.username
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        auth:
            pattern: ^/api/.*
            api_key: true
            stateless: true

Can you tell me what's wrong ?

Thx a lot for your time.

Best regards

Get ride of FOSUserBundle, how to achieve this?

Lets said I have a restful API open to the world and I don't want that, instead I want to secure the endpoint. This is part of my security.yml file:

access_control:
    - { path: ^/api/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

As you can see any can access the API so this area needs to be secured in somehow. My idea? By passing a parameter at the request header. Since my client is an iOs app then they need to take care of send that parameter when request any API endpoint. The parameter is named X-PDONE-SESSION-ID and basically it holds a PHP session. How I can protect the API? Any ideas using this bundle or any other ideas?

Use a secure random number generator

Looking for a library to use and noticed you use rand to generate api keys.

You should use random_bytes or similar to securely do this. Rand is not appropriate.

FosUserbundle and Api authenticate

My config:
bez tytulu
When i execute:
http://warehouse.dev/app_dev.php/api/hello?api_key=MmJmY2YzMGQzMzQ2ZDRmOWM1NmY3NDRiMmY2YzFkOWM0Y2YzMW

Symfony redirect me to FosUserBundle login page.
What I'm doing wrong with my configuration?

ApiKeyProvider's method doAuth should be protected

The method doAuth throw exception with messages, so it should be customable.
One way to do it is by extending the class but since doAuth is a private method, you can't.
Would you take this in consideration ?

Thanks for your awesome code,
Cyrille

Remove FosUserBundle dependency

Hi,

i'm working on a fork of this bundle to remove the FOSUserBundle dependency and just rely on Doctrine. Would you support it in this way? So i would make a Pull Request. Otherwise, I'll refactor it it my own Namespace and add some more stuff.

Exceptions being ignored by FOSRestBundle

I'm using this bundle with FOSRestBundle and FOSUserBundle.

In order to produce a JSON response to a failed authentication I've found that I need to modify:

vendor/uecode/api-key-bundle/src/Uecode/Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php:73

        //throw $failed;
        $message = $failed->getMessage();

Is this a bug, or should I not need to do this to get a JSON response?

FOSUserBundle

Hi.

Quick question: What in the FOSUserBundle is this bundle dependent on? In other words, what is it with the UserEntity in the FOSUserBundle it needs? Or is the dependency elsewhere? As you might understand, what I really want to know is if it's any way to use this without using the FOSUserBundle.

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.