Git Product home page Git Product logo

Comments (5)

jfritschi avatar jfritschi commented on May 24, 2024 1

You can use something like this:

phpCAS::setServerLoginUrl('https:/somwhere.org/cas/login?id=kkvilekval');

The setServerLoginUrl() [1] function overrides the autogenerated login url. You can embedd any kind of parameters in this function.

[1] http://downloads.jasig.org/cas-clients/php/current/docs/api/group__internalConfig.html#gac2d9a37c0dca05e079b078ca67a9c325

from phpcas.

kgk avatar kgk commented on May 24, 2024

I am not sure I understand your response.
Our web application has a single text field with
username or email:

We get the username or email and try to determine if the user authenticates with a CAS Server ..
If so.. then we redirect the browser to the CAS server and we would like to pass in the username id so the CAS server can generate the form with the ID pre-filled.

Thx,
K

from phpcas.

jfritschi avatar jfritschi commented on May 24, 2024

Are you using the phpcas library to do the authentication and redirection? If the answer is "yes" you have to initialize the phpcas like in any other app and simply override the login url with a custom login url where you can embedd your username as a variable.
It's similar to one of our examples. [1] Instead of overriding the validation url you simply override the login url with and url that includes your pararmeter. phpcas supports that this url contains any kind of other parameter any simply appends it's magic behind your definded url.
If you are not using the phpcas library you are on your own but doing a "header()" redirect to the cas server. This is fairly straight forward and can be seen in [2]. Just add whatever parameters you need but. You can still use phpcas for doing the validation but that will be tricky to do this "half" integration.

Regarding the cas server sided changes you might need to do a small login page customization to autofill the username field. I don't think that is supported out of the box.

[1]https://github.com/Jasig/phpCAS/blob/master/docs/examples/example_custom_urls.php
[2]http://downloads.jasig.org/cas-clients/php/current/docs/api/Client_8php_source.html#l01391

from phpcas.

kgk avatar kgk commented on May 24, 2024

Hello,

On Wed, May 30, 2012 at 9:53 PM, Joachim Fritschi
[email protected]
wrote:

Are you using the phpcas library to do the authentication and redirection? If the answer is "yes" you have to initialize the phpcas like in any other app and simply override the login url with a custom login url where you can embedd your username as a variable.

No.. I've wriiten a python repose.who handler handling the CAS ticket
protocol. This works well
and during the normal login process we redirect to the CAS server (not
under my control).

It's similar to one of our examples. [1] Instead of overriding the validation url you simply override the login url with and url that includes your pararmeter. phpcas supports that this url contains any kind of other parameter any simply appends it's margic behind your definded url.
If you are not using the phpcas library you are on your own but doing a "header()" redirect to the cas server. This is fairly straight forward and can be seen in [2]. Just add whatever parameters you need but. You can still use phpcas for doing the validation but that will be tricky to do this "half" integration.

Regarding the cas server sided changes you might need to do a small login page customization to autofill the username field. I don't think that is supported out of the box.

I guess this is exactly what I am asking for.. An enhancement request
that the form be filled out
with the username if I pass it it during the initial redirection.

[1]https://github.com/Jasig/phpCAS/blob/master/docs/examples/example_custom_urls.php
[2]http://downloads.jasig.org/cas-clients/php/current/docs/api/Client_8php_source.html#l01391


Reply to this email directly or view it on GitHub:
#39 (comment)

Kristian G. Kvilekval ([email protected]) 805-636-1599

from phpcas.

jfritschi avatar jfritschi commented on May 24, 2024

To my knowledge the automatic filling of the user field is not supported by choice by the cas server. Security being the main problem to my knowledge. The cas philosophy is that the cas server is the only server to recieve or gather credentials.

But you are currently filing an issue at the wrong project. phpcas is a cas client library in php. Your request is better suited at cas server project or the cas-user or cas-dev mailing list.

But in my view your request is a simple change in the /WEB-INF/view/jsp/default/ui/casLoginView.jsp of the cas server which you can do locally or you need to convince your cas server operators of.

Anyway i'm closing this issue here.

from phpcas.

Related Issues (20)

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.