GithubHelp home page GithubHelp logo

andersonkoester / angular-symfony Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acrecio/angular-symfony

0.0 2.0 0.0 576 KB

Project Bootstrap for an angularJS + Symfony project

License: MIT License

ApacheConf 2.71% PHP 66.62% JavaScript 25.15% Shell 2.88% Ruby 0.57% HTML 1.60% CSS 0.48%

angular-symfony's Introduction

angular-symfony

Project Bootstrap for an angularJS + Symfony webservices project.

Introduction

This project is a template application with secured communication via a RestFul API between the client part with AngularJS and the server part with Symfony2.

Installation

Clone the project :

git clone [email protected]:FlyersWeb/angular-symfony.git angular-symfony

Update packages :

cd angular-symfony
composer.phar install

Create cache and logs folders :

mkdir app/cache
mkdir app/logs
chmod -R 777 app/cache
chmod -R 777 app/logs

Edit database credentials :

vim app/config/parameters.yml

Update schemas (FOSUserBundle) :

php app/console doctrine:schema:create

Create and activate user :

php app/console fos:user:create
php app/console fos:user:activate

Link project to your webserver and access it :

ln -snf ./ /var/www/html/angular-symfony
firefox http://localhost/angular-symfony/ &

Authentication system

The Authentication system is based on the custom Authentication Provider of the Symfony2 Cookbook : http://symfony.com/doc/2.1/cookbook/security/custom_authentication_provider.html

The following chapter demonstrates how to create a custom authentication provider for WSSE authentication. The security protocol for WSSE provides several security benefits:

  • Username / Password encryption
  • Safe guarding against replay attacks
  • No web server configuration required

WSSE is very useful for the securing of web services, may they be SOAP or REST.

I used the exact same authentication system with a little change in moment of generating the digest, we use the hexadecimal value of the hashed seed in lieu of the binary value.

Client Side specifics

On the client side, I've inspired my code from Nils Blum-Oeste article explaining how to send an authorization token for every request. To do this you have to register a wrapper for every resource actions that execute a specific code before doing the action. For more information you can check http://nils-blum-oeste.net/angularjs-send-auth-token-with-every--request/.

The differences there is that I send the token, username and user digest in the HTTP Header X-WSSE.

Conclusion

You can use this template and adapt it to your needs.

@FlyersWeb

angular-symfony's People

Contributors

isleshocky77 avatar jimx6 avatar vladapopster avatar

Watchers

 avatar  avatar

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.