Giter VIP home page Giter VIP logo

demo-cas-server-with-db's Introduction

CAS Server demo web app

This demo app use Database-Authentication(QueryDatabaseAuthenticationHandler) to authentication.

Config(App)

  1. Create a directory to for cas config files,e.g. D:\var\temp\cas-conf
  2. Copy cas.properties (in {YOUR_PROJECT_DIR}/etc/) to D:\var\temp\cas-conf

If you want use another path,you need to edit propertyFileConfigurer.xml file(in src/main/webapp/WEB-INF/spring-configuration)

  1. edit cas.properties (in D:\var\temp\cas-conf),values need to change:
  • database.url : database connection string
  • database.user:user name(database)
  • database.password:password(database)

Config(Database)

  1. create database schema and table
CREATE SCHEMA `cas-user-db` DEFAULT CHARACTER SET latin1 ;
CREATE TABLE `cas-user-db`.`users` (
  `user_name` VARCHAR(32) NOT NULL COMMENT 'the user\'s  id',
  `user_email` VARCHAR(128) NULL COMMENT '',
  `user_pwd` VARCHAR(256) NOT NULL COMMENT 'password,plain text',
  `create_timestamp` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
  PRIMARY KEY (`user_name`)  COMMENT '')
COMMENT = 'user table';
  1. insert data (to test)
INSERT INTO `cas-user-db`.`users` (`user_name`, `user_pwd`) VALUES ('john', '123456');

Test

  1. Run CAS Server
  2. CAS will be available at: http://127.0.0.1:8080/cas
  3. use john/123456 (username and password) to test login

demo-cas-server-with-db's People

Contributors

cj216 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.