Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

[Preview] Vatsim Connect for Moodle


Sarantos Tsialtas
 Share

Recommended Posts

Sarantos Tsialtas
Posted
Posted (edited)

Hi guys, 

after a few days with the help from here this is my settings for moodle platform for OAuth2

image.thumb.png.147631430abd3edcb2e97084495341dd.png

image.thumb.png.34aae7f009dbb7bb588788e6da1adfbe.pngimage.png.4a9238d9387661bde62b2e492df7f67a.pngimage.thumb.png.22c9c0829ad36f2472d04d7f5c1bb1be.png

 

if you want to disable e-mail confirmation uppor 1rst login with Vatsim Connect run the commad bellow in your database: (you have to run it every time you change your settings on Vatsim Connect)

UPDATE mdl_oauth2_issuer SET requireconfirmation = 0  WHERE id = 1;

 

 

Edited by Sarantos Tsialtas
IP Wildcard and callback url
  • Like 1
Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

Matt Bozwood-Davies
Posted
Posted

Hi Sarantos

You should be able to use the built in, or any, OAuth2 module.

Matt

Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted
22 hours ago, Matt Bozwood-Davies said:

Hi Sarantos

You should be able to use the built in, or any, OAuth2 module.

Matt

i tried auth plugin and it worked.....

i tried aslo the built in one but i cant make it work... 

Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

Nick Harasym
Posted
Posted

When trying to use the auth plugin are any errors happening?

Nick Harasym
VATSIM Senior Developer
Team Lead, Infrastructure
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted

on Login Page i get 

Quote

No user information was returned. The OAuth 2 service may be configured incorrectly.

i use the settings bellow....

image.png.d0c14f1b21e033ba861c681a50b808a1.pngimage.thumb.png.f2ab7696ad4b3715ff16cc9bf49da06d.pngimage.thumb.png.9dc4cc2eefb7a27ebe2677c53a3f5312.png

Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

Matt Bozwood-Davies
Posted
Posted

From what I can tell. service base URL needs to be https://auth.vatsim.net not your domain.

It might be worth looking at nested properties for the field mappings. Not sure how to do it as VATSIM doesn't have our own moodle service. There are several divisions that do so might be able to elaborate if they have achieved it.

 

Matt

 

Link to comment
Share on other sites

Daniel Lange
Posted
Posted

The Moodle documentation of OAuth2 user field mappings isn't great, I had to dig quite a while to figure this out for ourselves a while ago. Long story short, if the data is returned in a array that you need to nest, you use "-" to indicate this in the field mapping.

For instance "data-id" and "data-personal-name_first". This is probably your issue here, also as Matt said, service URL should be auth.vatsim.net.
You can find the data structure here: http://wiki.vatsim.net/connect.html under "Return Data Structure". I can't give you the exact copy of our settings as we've a quite different system for logging in.

Daniel Lange

Web Services Director
Vatsim Scandinavia

[email protected]

Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted
18 hours ago, Daniel Lange said:

The Moodle documentation of OAuth2 user field mappings isn't great, I had to dig quite a while to figure this out for ourselves a while ago. Long story short, if the data is returned in a array that you need to nest, you use "-" to indicate this in the field mapping.

For instance "data-id" and "data-personal-name_first". This is probably your issue here, also as Matt said, service URL should be auth.vatsim.net.
You can find the data structure here: http://wiki.vatsim.net/connect.html under "Return Data Structure". I can't give you the exact copy of our settings as we've a quite different system for logging in.

thanks iu will try it and i will be back, also 

Quote

},
      "oauth":{
         "token_valid":"true"
      }

must be stored on database?

Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

Daniel Lange
Posted
Posted
2 hours ago, Sarantos Tsialtas said:

thanks iu will try it and i will be back, also 

must be stored on database?

No need, only store what you need for Moodle to function, which is pretty much username, name and email.

Daniel Lange

Web Services Director
Vatsim Scandinavia

[email protected]

Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted (edited)
1 hour ago, Daniel Lange said:

No need, only store what you need for Moodle to function, which is pretty much username, name and email.

thanks i made it work...  now looking how to disable e-mail confirmation after login 

thanks for your time

 

Update: finally it worked... 1st post updated

 

Edited by Sarantos Tsialtas
Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

  • Sarantos Tsialtas changed the title to [Preview] Vatsim Connect for Moodle
  • 3 weeks later...
Sean Tan
Posted
Posted

Hi Sarantos, 

Thank you for your post regarding the VATSIM connect for Moodle. 

These are my current configuration for my oauth: https://prnt.sc/w5uk5uhttps://prnt.sc/w5ukfohttps://prnt.sc/w5ukks

However, I am seeing an error as stated: https://prnt.sc/w5uksp

 

Am I missing something ? 

Thanks 

 

Sean Tan 

Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted
15 hours ago, Sean Tan said:

Hi Sarantos, 

Thank you for your post regarding the VATSIM connect for Moodle. 

These are my current configuration for my oauth: https://prnt.sc/w5uk5uhttps://prnt.sc/w5ukfohttps://prnt.sc/w5ukks

However, I am seeing an error as stated: https://prnt.sc/w5uksp

 

Am I missing something ? 

Thanks 

 

Sean Tan 

 

Did you used an IP Wildcard (*)  at https://auth.vatsim.net  ?

Sarantos Tsialtas
vACC Director - ACCGR1
VSKgCsZ.png [email protected] 
ZWqL3H9.png Hellenic vACC
Link to comment
Share on other sites

Sean Tan
Posted
Posted

I don't think I am using one. 
 

Link to comment
Share on other sites

Sean Tan
Posted
Posted (edited)

In such a case, would I need to add in an ip address from my main host for auth.vatsim.net in order to ensure that it is working ? 

Second question: In regards to the oauth2callback.php, do u have the sample coding to be used if required or would the default script by moodle be suffice ? 

Thanks for your help 

 

Sean 

Edited by Sean Tan
Link to comment
Share on other sites

Sarantos Tsialtas
Posted
Posted
On 12/21/2020 at 9:38 AM, Sean Tan said:

In such a case, would I need to add in an ip address from my main host for auth.vatsim.net in order to ensure that it is working ? 

Second question: In regards to the oauth2callback.php, do u have the sample coding to be used if required or would the default script by moodle be suffice ? 

Thanks for your help 

 

Sean 

 

due to the scracture of our systems i am using my main IP adress from webserver and (*) for the rest....

 

the default script its ok

 

Merry Christmas

 

 

image.png.2adead2847345871f5c2914de85d0213.png

Link to comment
Share on other sites

 Share