How to use CAS authentication with angular2 webpack startter typescript?

I am using the following:

https://github.com/gdi2290/angular-starter

I am running an application with npm startthat uses the webpack dev server. My problem is that I want to add CAS authentication, but I have no idea what is going on. This is the library I'm trying to use:

https://github.com/TencentWSRD/connect-cas2

All the examples seem to use express, although I'm not sure if I can use this with the webpack-dev server, as well as with the starter that I use? If so, how to use it? Or do I need another CAS library compatible with running npm?

+4
source share
1 answer

Webpack - . , " " - .

- , . , connect-cas2 node.js express. , .

connect-cas2, , . , - , , .

, , CAS. :

// the proxy option is part of the devServer in your webpack.config.js
devServer: {
    contentBase: 'public',

    // setup a proxy
    proxy: {
        // just replace the /cas/validate endpoint to the endpoint in your 
        // website that will trigger the api call
        '/cas/validate': 'https://url-to-your-cas-server.com'
    }
},
+3

Source: https://habr.com/ru/post/1690984/


All Articles