Catalyst::Manual::Tutorial::Authentication

Catalyst::Manual::Tutorial::Authentication is a Perl module which contains a Catalyst tutorial about authentication.
Download

Catalyst::Manual::Tutorial::Authentication Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kennedy Clark
  • Publisher web site:
  • http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7012/lib/Catalyst/Manual/Installation/CentOS4.pod

Catalyst::Manual::Tutorial::Authentication Tags


Catalyst::Manual::Tutorial::Authentication Description

Catalyst::Manual::Tutorial::Authentication is a Perl module which contains a Catalyst tutorial about authentication. Catalyst::Manual::Tutorial::Authentication is a Perl module which contains a Catalyst tutorial about authentication.BASIC AUTHENTICATIONThis section explores how to add authentication logic to a Catalyst application.Add Users and Roles to the DatabaseFirst, we add both user and role information to the database (we will add the role information here although it will not be used until the authorization section, Part 5). Create a new SQL script file by opening myapp02.sql in your editor and insert: -- -- Add users and roles tables, along with a many-to-many join table -- CREATE TABLE users ( id INTEGER PRIMARY KEY, username TEXT, password TEXT, email_address TEXT, first_name TEXT, last_name TEXT, active INTEGER ); CREATE TABLE roles ( id INTEGER PRIMARY KEY, role TEXT ); CREATE TABLE user_roles ( user_id INTEGER, role_id INTEGER, PRIMARY KEY (user_id, role_id) ); -- -- Load up some initial test data -- INSERT INTO users VALUES (1, 'test01', 'mypass', 't01@na.com', 'Joe', 'Blow', 1); INSERT INTO users VALUES (2, 'test02', 'mypass', 't02@na.com', 'Jane', 'Doe', 1); INSERT INTO users VALUES (3, 'test03', 'mypass', 't03@na.com', 'No', 'Go', 0); INSERT INTO roles VALUES (1, 'user'); INSERT INTO roles VALUES (2, 'admin'); INSERT INTO user_roles VALUES (1, 1); INSERT INTO user_roles VALUES (1, 2); INSERT INTO user_roles VALUES (2, 1); INSERT INTO user_roles VALUES (3, 1);Then load this into the myapp.db database with the following command: $ sqlite3 myapp.db < myapp02.sql Requirements: · Perl


Catalyst::Manual::Tutorial::Authentication Related Software