summaryrefslogtreecommitdiffstats
path: root/app/login/controllers/login-controller.js
Commit message (Collapse)AuthorAgeFilesLines
* Block forwarding to non-local urlJames Feist2020-02-111-1/+3
| | | | | | | | | | | | | | | | | Currently we don't protect against forwarding to remote url, so things like: https://<bmc-address>/#/login?next=http:%2F%2Fyahoo.com can be used to forward an unsuspecting user to a different url. This fixes that issue. Tested: Local redirects still work, above link does not Closes #109 Change-Id: I4d6c52880156802860f405af43037fb84235912f Signed-off-by: James Feist <james.feist@linux.intel.com>
* Fix login error messagebeccabroek2019-03-271-1/+1
| | | | | | | | | | | | | | | | Respose for invalid credentials changed and login page was no longer displaying the correct error message to the user when invalid credentials were entered. Resolves openbmc/phosphor-webui#72 Tested: Logged in with incorrect credentials and saw the correct message. Also logged in with an unreachable host and saw that that message was displaying correctly. Change-Id: I65cc6d6a061986568aded09555c5f75bcd59fe56 Signed-off-by: beccabroek <beccabroek@gmail.com>
* Form validation on login pagebeccabroek2019-02-021-6/+8
| | | | | | | | | | | | | | | | | | Using ngMessages, adds form validation to login page. Also creates a directive, hasError, to be used to validate form field by passing in a boolean. This is a proposed pattern to be used moving forward, as form validation is added to additional pages. Validation error messages are shown on $touched and on submit. Unreachable Server and Invalid username and password error messages remain until input is no longer $pristine after form submission. In addition, this removes unneeded and unused css styling Resolves openbmc/phosphor-webui#47 Change-Id: I7a067af67ac74d4cf2977d10f66445720ecae9eb Signed-off-by: beccabroek <beccabroek@gmail.com>
* phosphor-webui: Allow after login redirectsEd Tanous2018-11-191-4/+13
| | | | | | | | | | | | | | When redirecting a user to a login url, it is helpful to be able to point them to a url that after login, will forward to the requested page. This is accomplished by the use of a url param named "next" which specifies the URL that the user wants to be redirected to after login. If no next url is specified, the user is redirected to the overview page, like the vehavior before. Change-Id: Iff0da65632119a8f7ae3f35eb74147ca67563f30 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* Highlight correct fields on errorsGunnar Mills2018-09-121-1/+1
| | | | | | | | | | | | | | | | If the error is 'Invalid username or password', the 'Username' and 'Password' fields now becomes red. On any other error (e.g. Server unreachable) the 'BMC Host or BMC IP Address' field is red. Before the 'BMC Host or BMC IP Address' and 'Username' were red on all errors. Resolves openbmc/phosphor-webui#17 Tested: See correct fields highlighted. Change-Id: I55514cfb428170cd125ec01eb4c7184fbadd3894 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add comment for keyCode 13Gunnar Mills2018-09-121-0/+2
| | | | | | | keyCode 13 is the 'Enter' button. Change-Id: I49d6fc00b8e009835b93ed1f62f7f22be083216e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Login: Remove unused APIUtilsGunnar Mills2018-09-121-2/+2
| | | | | | | Tested: Able to login Change-Id: I50e459b5b3f35e731649377665449123d4934709 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Login: Remove unused routeParamsGunnar Mills2018-09-121-2/+2
| | | | | | Tested: Able to login Change-Id: Id87900c160781edf4cb473d32f7d7fa3112c6dd7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Move to clang-format-6.0Gunnar Mills2018-09-041-1/+0
| | | | | | | The docker image moved from clang-format-5.0 to clang-format-6.0. Change-Id: I3c615d7df1f21569531b4dc2cb0bc4f425cb43f8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Format code using clang-format-5.0Andrew Geissler2018-05-241-43/+32
| | | | | | | | Once merged, this repository will have CI enforce the coding guidelines in the .clang-format file. Change-Id: I96a05972665f9c67625c6850c3da25edc540be06 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Run js-beautify and fixjsstyle on codeAndrew Geissler2018-05-241-44/+45
| | | | | | | | | | | Found this pointer on stackoverflow: https://stackoverflow.com/a/31660434/5508494 End goal is to get the code formatted well enough that clang format will run correctly against it. Change-Id: I80053e78d253d8eee49233e42d55e5807ae8fdc8 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Remove the version from each fileGunnar Mills2018-04-301-1/+0
| | | | | | | | Already have a Web UI version, no need to track the version of each file. These have not been getting updated. Change-Id: I1cd3a2c2d67b24ded5edcca9dbfd3f6806d93ed4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Show error message received from server sideAlexander Filippov2018-03-271-6/+5
| | | | | | | | | | | | When an error occurs during authorization, display the error message received from server side instead hardcoded message. Partially resolves openbmc/openbmc#2974 Resolves openbmc/openbmc#3024 Tested: Enter invalid username or password and verify error message Change-Id: I91ca29d5a69e12e12ce490ce3206173de7d41f09 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
* Removed bypass login scriptIftekharul Islam2018-03-071-6/+0
| | | | | | | | | We had a script that allowed users to bypass login to see the app interface. We did this for testing purpose. This commit removes that functionality and improves security. Change-Id: I17255f16082d5460015788130f2482f2849ce975 Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
* Remove trailing spaces from filesGunnar Mills2018-03-051-5/+5
| | | | | | Tested: Manually tested GUI for any regressions Change-Id: I8c0922b7bd67b03b07e8880bc4dba3b862220b33 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Updating login structureIftekharul Islam2017-11-021-4/+8
| | | | | | | Updated login structure with a field where user can manually add server hostname if it is not populated automatically Change-Id: I147c2c15869131540e327bda26c05b59d78e01d5 Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
* Updating server health icon in header based on event log statusIftekharul Islam2017-10-091-3/+6
| | | | | Change-Id: Iae10d39428b6ce6a228e775aa68fb7805dd61ecb Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
* Changed from overview/system to overview/server to match site IAMichael Davis2017-10-091-2/+2
| | | | | Change-Id: Icf3e447a21d0f9232ba80ed1969101218552d439 Signed-off-by: Michael Davis <michael.s.davis@ibm.com>
* Added hardware sensors functionalityIftekharul Islam2017-09-201-6/+3
| | | | | Change-Id: I99435613bb77fc0ff72f046c2dc047b13962a7a3 Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
* Change navigation structureIftekharul Islam2017-09-201-5/+8
| | | | | Change-Id: I12c819293ce1eda188dc9f257ae9370f1b73cb18 Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
* Added fake login page for testing and demoIftekharul Islam2017-09-201-2/+9
| | | | | Change-Id: Ife37444dcede67b54d1f257ee99322b22ac6b78c Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
* Major update to code structureIftekharul Islam2017-09-201-0/+52
* Split files into independent files based on functionality. * Switch to bower/gulp for build. Change-Id: Ibc775dd9b7f6a0a49f63c22162b7582e781e2d9c Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
OpenPOWER on IntegriCloud