Comments (5)
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.
from phpcas.
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.
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.
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.
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)
- phpunit tests broken in github actions HOT 2
- phpCAS::getAttributes gives me an empty array HOT 7
- No ability to disable displaying errors directly into the response. HOT 2
- Differentiate ErrorException from GracefullTerminationException HOT 1
- deprecation warning in php 8.1.2 HOT 2
- time for new release? HOT 3
- Is there a way to use phpCAS within a Symfony API REST? HOT 1
- Endless Loop, ticket not found HOT 5
- Autoload.php should not emit a composer-preferred warning HOT 3
- Version 1.6.0 is a breaking upgrade and is not compatible with older versions HOT 7
- jasig/phpcas package should be abandoned in favor of apereo/phpcas HOT 9
- login with 1.6.0 wrong redirection HOT 2
- Non-empty $_SESSION array disrupts page caching techniques
- DOMDocument::loadXML(): Argument #1 ($source) must not be empty HOT 2
- phpCAS relies on curl being available HOT 1
- Alternate URL for logout requests HOT 4
- GracefullTerminationException : warning with PHP 8.0 HOT 3
- renewAuthentication doesn't force renew if user already authenticated
- Issue with User Attribute Retrieval in phpCAS Versions Beyond 1.3.8 HOT 1
- Any plans on upgrading to PHP 8.0 or above ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpcas.