Single Sign-on

Source: Internet
Author: User
Send a link to the following parameters do not go to the landing page directly go to the background method of landing and then jump to the first page of the PHP project, how to operate




This is the backstage landing method,
function User_login ($username, $password, $code = null, $login _type = 0, $is _oauth=null) {
Global $_lang,$_k;

$username =$_get[' username ']
$password =$_get[' password ']

$_session [' username '] = $user _info [' username '];
$_session[' password '] = $user _info[' password ');


$this->account_init ($username);
$this->password_init (MD5 ($password));
$this->login_type ($login _type);
if ($this->_login_times) {
$this->check_code ($code);
}
$accout _type = $this->get_login_type ();
Switch ($this->_sys_config [' user_intergration ']) {
Case "1":
Switch ($accout _type) {
Case ' mobile ':
$user _info = $this->valid_moble_auth ();
Break
Case ' Email ':
$user _info = $this->valid_email_auth ();
Break
Case ' username ':
$user _info = $this->valid_username ();
Break
}
ElseIf ($user _info [' status '] = = 2) {
$this->show_msg (' '. $_lang [' account_has_freeze_or_unactivate ']. ', 4, ' index.php?do=login ');
} elseif ($user _info [' status '] = = 3 && $login _type!=1) {
$this->show_msg (' '. $_lang [' account_has_not_excited ']. ', 6, ' index.php?do=login ');
}
return $user _info;
}
function Login_freeze () {
if ($this->check_black ()) {
$db _times = $this->get_login_times ($this->_login_uid);
$db _times!=0 and Db_factory::execute (sprintf (' Update%switkey_member_black set ' login_times ' = ' login_times '-1 where ' UID ' =%d ', tablepre, $this->_login_uid));
}else{
$expire =time () +24*3600;
Db_factory::execute (sprintf (' INSERT INTO%switkey_member_black (' b_id ', ' uid ', ' expire ', ' on_time ', ' login_times ') VALUES (null,%d,%d,%d,4) ', Tablepre, $this->_login_uid, $expire, Time ()));
}
$db _times = $this->get_login_times ($this->_login_uid);
return $db _times[' Login_times '];
}
function Check_black () {
$rs = Db_factory::get_one (sprintf (' select ' uid ' from%switkey_member_black where ' uid ' =%d ', Tablepre, $this->_login_ UID));
if ($rs [' uid ']) {
return true;
}else {
return false;
}
}

function Valid_username () {
$username =$_get[' username ']
$password =$_get[' password ']
Global $_lang;
$user _info = Kekezu::get_user_info ($this->_account, 1);
if ($user _info) {
$user _info [' login_type '] = ' username ';
Header (' Location:index.php ')
return $user _info;
} else {
$this->add_login_time ();
$this->show_msg (' Username or password error, please check that the account is entered correctly ', 3, ' index.php ', 1);
}
}

What can I do to achieve the function of demand?









Resolved in an append 50


Reply to discussion (solution)

You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.

You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.




I'm just going to make myself a landing page link, and I'm out of the box, but I'm in the background GET request not get to AH get to not should the argument behind the link work? But it still works in the form.

You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.



1. Can post 2 or submit the entire table via get

1. Can post 2 or submit the entire table via get



Now it's working with get, but why is the form submitted?


You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.




The amount form or post, URL is get but if you don't rewrite the routing rules, your login.html#username=xx#password=xx is wrong.
Get adds the data in the form as Variable=value, followed by the URL to which the action points, and both use "?". Connection, and each variable is connected using the "&" connection



You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.




The amount form or post, URL is get but if you don't rewrite the routing rules, your login.html#username=xx#password=xx is wrong.
Get adds the data in the form as Variable=value, followed by the URL to which the action points, and both use "?". Connection, and each variable is connected using the "&" connection





I'm definitely going to have to use the GET request. PHP listen to me that the manager means to get the value directly into the background of the session to go to the background of the landing method and then jump to the landing successful page and display I started to use the & link but because this is an HTML page I use & Link Error Ah, I'm coming with the # # I should get the URL first, and rewrite the route.




You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.




The amount form or post, URL is get but if you don't rewrite the routing rules, your login.html#username=xx#password=xx is wrong.
Get adds the data in the form as Variable=value, followed by the URL to which the action points, and both use "?". Connection, and each variable is connected using the "&" connection





I'm definitely going to have to use the GET request. PHP listen to me that the manager means to get the value directly into the background of the session to go to the background of the landing method and then jump to the landing successful page and display I started to use the & link but because this is an HTML page I use & Link Error Ah, I'm coming with the # # I should get the URL first, and rewrite the route.


The newcomer is too new. Ask your colleague about these questions ... After all, the network response is not timely and inefficient





You can include information about your logged-in user in links such as
User name yyyy password for xxxxx with 0123456789 to differentiate
The link is constructed as a xx.php? Loginstring=yyyy0123456789xxxxx
As for how you put a secret to loginstring, you're free to play.




The amount form or post, URL is get but if you don't rewrite the routing rules, your login.html#username=xx#password=xx is wrong.
Get adds the data in the form as Variable=value, followed by the URL to which the action points, and both use "?". Connection, and each variable is connected using the "&" connection





I'm definitely going to have to use the GET request. PHP listen to me that the manager means to get the value directly into the background of the session to go to the background of the landing method and then jump to the landing successful page and display I started to use the & link but because this is an HTML page I use & Link Error Ah, I'm coming with the # # I should get the URL first, and rewrite the route.


The newcomer is too new. Ask your colleague about these questions ... After all, the network response is not timely and inefficient




It's because my co-workers don't have PHP. I'm doing this all by myself. Great God, roughly speaking, I'm going to be worried crazy.

You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in

You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in



Main two items One is Java and the other is PHP will there be any conflict


You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see




You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see


You first clear your mind and then write code does not pass again let us help you check ...





You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see


You first clear your mind and then write code does not pass again let us help you check ...






You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see


You first clear your mind and then write code does not pass again let us help you check ...





I am now in the link to send the past that stuck a colleague of mine he wrote a similar he is by the Java method of the background of the path to the stitching up, let the link go backstage method, but in PHP I try to spell his URL but useless ah Please help me to see how to make a link to the background of the landing method for several days, first to you to solve the additional 50






You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see


You first clear your mind and then write code does not pass again let us help you check ...






You talked very lively, but did not say to the point!

The so-called single sign-on is: After logging in one place, by passing the login information, so that other places no longer sentenced to not logged in




Would you mind asking that specific thing? The first landing Success page has a button click to send a hyperlink followed by a user name sent to the second landing landing screen and then the second page backstage to get his pass the value of the landing method after the direct jump to the landing successful home

Suppose your a page login succeeded in generating a b.php? Token=fsadfads where token contains a user's login information, as to how to identify the user's legal identity, it depends on you. As you say HTML cannot take parameters ... The  simplest is the b,php identification after the header location is not good ...



is because of the beginning with the user name verification and then add the header location not out of the project itself and code too much so I built a new on the Internet to find a way to use the landing method, I and colleagues to study a colleague said now the most important is to let me send the link can go my backstage that the landing method And then press the + header location you said
Could you please help me see


You first clear your mind and then write code does not pass again let us help you check ...





I am now in the link to send the past that stuck a colleague of mine he wrote a similar he is by the Java method of the background of the path to the stitching up, let the link go backstage method, but in PHP I try to spell his URL but useless ah Please help me to see how to make a link to the background of the landing method for several days, first to you to solve the additional 50




Just found to the sub-post can not reply I'm waiting sorry AH

Can't you use the session? Judging the current state

Play the yellow piece install and play the list now:

HTTP protocol, 301 redirect, header (' lo ');

HTTP protocol, 301 redirect, header (' lo ');

When successful, redirect to Header (' location:index.php ');

I'm sorry, I forgot to finish. Thank you for your help. But it doesn't matter now.

Do not understand, single-point landing with the simultaneous landing, 2 should be a different concept it

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.