The error is: "bad credentials"
I guess user/pass are wrong ....
On Fri, Dec 20, 2019, 22:06 Daniel Baker <[email protected]>
wrote:
> How can I perform the curl login . My efforts just result in errors :
>
> In ajax it looks like this :
>
>
> $.ajax({
> method: "GET",
> url: "services/user/login",
> data: {user: 'admin', pass: '12345'},
> dataType: "json"
> });
>
> *My curl sequence:*
>
>
> curl -k --header "Content-Type: application/json" -X get --data
> '{user:"admin",pass:"12345"}'
> https://test:5443/openmeetings/services/user/login
>
> *Error:*
>
> {"serviceResult":{"message":"error.bad.credentials","type":"ERROR"}}
>
>
>
>
> On 12/20/2019 8:27 AM, Maxim Solodovnik wrote:
>
> You can add zero to 'config' to avoid code modifications :)
>
> On Fri, Dec 20, 2019, 14:20 Daniel Baker <[email protected]>
> wrote:
>
>> I was able to get rid of this error by setting both to zero. It was a
>> problem I saw before and this issue was duplicated by another
>> developer.
>>
>>
>> , CURLOPT_SSL_VERIFYPEER => $this->config["checkpeer"] // Enable/Disable
>> SSL Cert checks
>> , CURLOPT_SSL_VERIFYHOST => $this->config["checkhost"] //
>> Enable/Disable hostname verification
>>
>>
>> Ill try the command curl with future problems.
>>
>>
>> Thanks,
>>
>> Dan
>>
>>
>> On 12/20/2019 2:01 AM, Maxim Solodovnik wrote:
>> > If you are able to login using browser
>> > Then I would:
>> > 1) try to call this URL with command line CURL
>> > 2) try to `play` with this 2 options:
>> >
>> https://github.com/openmeetings/openmeetings-moodle-plugin/blob/master/api/OmRestService.php#L87
>> >
>> > On Fri, 20 Dec 2019 at 00:00, Daniel Baker <[email protected]>
>> wrote:
>> >> Yeah it is. I changed the url for privacy reasons.
>> >>
>> >>
>> >>
>> >> On 12/19/2019 4:22 PM, Maxim Solodovnik wrote:
>> >>> Hello Daniel,
>> >>>
>> >>> I'm not very familiar with PHP CURL, is your OM login URL accessible
>> >>> to you ? (not accessible to me ...)
>> >>>
>> >>> On Thu, 19 Dec 2019 at 22:58, Daniel Baker <
>> [email protected]> wrote:
>> >>>> I am receiving this service fault in the browser.
>> >>>>
>> >>>> It seems to me the cert array should not be empty like this:
>> >>>>
>> >>>> Array
>> >>>> (
>> >>>> [url] =>
>> https://ukom.org:5443/openmeetings/services/user/login?&user=xxxxxx&pass=xxxxxxxxx
>> >>>> [content_type] =>
>> >>>> [http_code] => 0
>> >>>> [header_size] => 0
>> >>>> [request_size] => 0
>> >>>> [filetime] => -1
>> >>>> [ssl_verify_result] => 18
>> >>>> [redirect_count] => 0
>> >>>> [total_time] => 0.141175
>> >>>> [namelookup_time] => 0.062084
>> >>>> [connect_time] => 0.063309
>> >>>> [pretransfer_time] => 0
>> >>>> [size_upload] => 0
>> >>>> [size_download] => 0
>> >>>> [speed_download] => 0
>> >>>> [speed_upload] => 0
>> >>>> [download_content_length] => -1
>> >>>> [upload_content_length] => -1
>> >>>> [starttransfer_time] => 0
>> >>>> [redirect_time] => 0
>> >>>> [redirect_url] =>
>> >>>> [primary_ip] => xxxxxxxxxxxxxxx // edited for privacy
>> >>>> [certinfo] => Array
>> >>>> (
>> >>>> )
>> >>>>
>> >>>> [primary_port] => 5443
>> >>>> [local_ip] => 192.168.1.145
>> >>>> [local_port] => 46540
>> >>>> )
>> >>>>
>> >>>> Fault (Service error)
>> >>>>
>> >>>>
>> >>>>
>> >>>> Are there any other abnormalities showing here that I can
>> not see
>> >>>> ?
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>>
>> >>>>
>> >>>> Dan
>> >>>>
>> >>>>
>> >>>
>> >
>> >
>>
>