Tagged: openig, Simple login form
This topic has 9 replies, 3 voices, and was last updated 5 years, 6 months ago by Sarankon Hiranphonlakrit.
-
AuthorPosts
-
December 26, 2016 at 3:40 am #15071
Sarankon Hiranphonlakrit
ParticipantI try to use openig to login my old system by follow the “12.2 simple login form”
but, I can’t pass login.
what I must to know and what have to do more ?
last one, If who have other tutorial like openig to login wordpress or other system, please tell me.thank you
December 27, 2016 at 10:04 am #15073Joachim Andres
ParticipantHi Sarankon,
The filter in the documentation is a sample assuming that you use form-based login and that the form contains the fields “username” and “password” expecting the corresponding values.
You need to reverse engineer the login page to figure the correct names and adjust the filter. You can also post the login page in this forum. Then I’d recommend to use static values for username and password to the test form.Cheers,
JoachimDecember 28, 2016 at 3:34 am #15083Sarankon Hiranphonlakrit
ParticipantI can’t post old system login page, system are in private network.
December 29, 2016 at 4:05 pm #15104violette
ParticipantHi Sarankon,
You will find in your login page, by using developer tools(F-12 on FF or Chrome) or reading the html/css of the login page, the two inputs tags required for login and password.
In old wordpress for example, these fields are named: log and pwd.In the doc example, you have:
{ "type": "PasswordReplayFilter", "config": { "loginPage": "${request.uri.path == '/login'}", "request": { "method": "POST", "uri": "https://www.example.com:8444/login", "form": { "username": [ "MY_USERNAME" ], "password": [ "MY_PASSWORD" ] } } } }
For wordpress, it will be something like:
{ "type": "PasswordReplayFilter", "config": { "loginPage": "${request.uri.path == '/login'}", "request": { "method": "POST", "uri": "https://mywordpress/wp-login.php", "form": { "log": [ "MY_USERNAME" ], "pwd": [ "MY_PASSWORD" ] } } } }
December 29, 2016 at 5:33 pm #15106Sarankon Hiranphonlakrit
ParticipantThank you, violette. I follow you, but I can’t login with my wordpress.
this my config file
{ "heap": [ { "name": "ClientHandler", "type": "ClientHandler", "comment": "Testing only: blindly trust the server cert for HTTPS.", "config": { "trustManager": { "type": "TrustAllManager" } } } ], "handler": { "type": "Chain", "config": { "filters": [ { "type": "PasswordReplayFilter", "config": { "loginPage": "${request.uri.path == '/login'}", "request": { "method": "POST", "uri": "http://www.corecode.in.th/wp-login.php", "form": { "log": [ "openig" ], "pwd": [ "openig" ] } } } } ], "handler": "ClientHandler" } }, "condition": "${matches(request.uri.query, 'demo=simple')}" }
I don’t know what I miss ?
-
This reply was modified 5 years, 7 months ago by
Sarankon Hiranphonlakrit.
January 9, 2017 at 9:55 am #15224violette
ParticipantHi Sarakon,
I tested your route and it works when I call
http://openig.example.com:8082/login?demo=simple
.
I get redirected and logged into the protected application.The URI must contain
demo=simple
to enter the route and/login
to play the PasswordReplayFilter.January 10, 2017 at 9:07 am #15246Sarankon Hiranphonlakrit
ParticipantYes, I already run
127.0.0.1:8080/login?demo=simple
but, it direct to login page it not pass.-
This reply was modified 5 years, 7 months ago by
Sarankon Hiranphonlakrit.
January 10, 2017 at 3:23 pm #15262violette
ParticipantSarankon, you could try to add this to the form:
"form": { "log": [ "<username>" ], "pwd": [ "<password>" ], "rememberme": [ "forever" ], "redirect_to": [ "<wordpress>/wp-admin/" ], "testcookie": [ "1" ] }
Also have a look to your .htaccess file to see if the /wp-login.php is protected against IP / POST methods, etc.
January 11, 2017 at 3:34 am #15272Sarankon Hiranphonlakrit
ParticipantThank you, violette.
I will try.January 16, 2017 at 7:36 am #15350Sarankon Hiranphonlakrit
Participantviolette, I can’t login it error
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
-
This reply was modified 5 years, 7 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.