Giter Club home page Giter Club logo

angularjs-cas-client-token's Introduction

angularjs-cas-client

This is a simple demo of an Angular JS based CAS client.

Let us say that we have a CAS server located at https://localhost:8443/cas. And we have a REST based web service at following location: https://localhost:8443/library with following two operations:

  • GET /api/book/GetBooks
  • POST /api/book/AddBook

From the web browser one can login to the CAS through https://localhost:8443/cas/login and execute the HTTP calls to the library service. But when we need to access it programatically, we have following two options:

  • Either fetch the login ticket and send it along with username and password to /cas/login
  • Or use the RESTful CAS approach.

Problem with the first approach can be CORS related hassles because the authentication will be traditional session cookie based. And this does not play that well with CORS as the OPTIONS header do not carry session cookies. And problem with the RESTful client is that for every service call, we need to fetch a service ticket. This eventually means one additional call to CAS for every service call, unless the CAS is configured to re-use service tickets.

This example demostratates the second approach.

angularjs-cas-client-token's People

Watchers

James Cloos avatar Prajwalan Karanjit 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.