backmeup / backmeup-prototype

BackMeUp v1 Standalone Backend
Other
3 stars 0 forks source link

MoodlePlugin: authentication error #66

Closed WolfgangEibner closed 12 years ago

WolfgangEibner commented 12 years ago

An authentication error in moodle plugin doesn't result in an appropriate message. Should be examined if it is a plugin, backend or UI error.

fjungwirth commented 12 years ago

The plugin provides a validate() method, which gives detailed information about an authentification error. But there is also a isValid() method, which returns wether true or false. I'm not sure which method is used by the rest api

ghost commented 12 years ago

Use Case of the isValid()-method:

  1. Core's preAuthentication method returns the required input fields (e.g. username + password)
  2. User enters username + password
  3. Core gets called with username + password as argument, which will be passed to the isValid-method of your validator. 4.1. If the username + password are ok (isValid returns true), the postAuth-method of your plugin will be called and the profile will be saved. 4.2. If the username or password are not ok (isValid returns false), a ValidationException will be thrown

The validate-method of the Validationable interface can be explicitly called via REST by using following REST calls:

WolfgangEibner commented 12 years ago

Validation should be automatically done at job creation/saving to save extra UI->Core calls.

WolfgangEibner commented 12 years ago

According to todays meeting validation is now done automatically.

ghost commented 12 years ago

Deployed and tested on dev01 & dev02