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

vatsim sso need abit help


samuel nygaard
 Share

Recommended Posts

samuel nygaard
Posted
Posted

hello my name is samuel nygaard atm is web master of vacc thai but havent bein so much into sso and stuff so i would like to get abit help thanks when i have uploaded the files the only thing i get is this http://prntscr.com/di9t6 Fatal error: Call to undefined function curl_init() in /var/www/html/SSO.cl[Mod - Happy Thoughts].php on line 333 i have edited the config file like it should be but yeah i hope to get abit help on this

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

The sample code uses the PHP cURL extension. From that error message it sounds as though you don't have it installed.

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

well that did work but now im getting this ive looking into the files and i cant see anything that could be wrong http://prntscr.com/diipkt An error occurred Error message: what can possiblety be wrong in here ?

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

I think we will need a little more information. What have you done so far? Have you double-checked the installation instructions this forum - if so, what items have you checked?

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

i have cheked the config file and filed out everything there is it anything else that i should file out tho and i checked the code in the other files as well didnt find anything that seem to be some erros in there

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

In the config file, which settings have you checked and what values have you entered?

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

i have entred sso key, secret, rsa ,and base link and retrun link

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

Please can you post the values too, so that we can check it's correct?

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

<?php

/**

* @author Kieran Hardern

*/

 

if (!defined('MOODLE_INTERNAL')) {

die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page

}

 

/*

* Contains all temporary config variables

*/

$sso = array();

 

/*

* The location of the VATSIM OAuth interface

*/

$sso['base'] = 'http://sso.hardern.net/server/auth/login/';

 

/*

* The consumer key for your organisation (provided by VATSIM)

*/

$sso['key'] = 'SSO_DEMO';

 

/*

* The secret key for your orgnisation (provided by VATSIM)

* Do not give this to anyone else or display it to your users. It must be kept server-side

*/

$sso['secret'] = 'js8Sm7nit-2a_~k_~My6_~';

 

/*

* The key for whic temporary (token) details for each user will be stored e.g. $_SESSION['mykey']

* If you chose to handle the tokens yourself by another method, you can remove this

*/

define('SSO_SESSION', 'oauth');

 

/*

* The URL users will be redirected to after they log in, this should

* be on the same server as the request

*/

 

// Using https or http?

$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https://' : 'http://';

 

// determing location from URL (comment out if manually defining - example below)

$sso['return'] = $http.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];

 

/*

* The signing method you are using to encrypt your request signature.

* Different options must be enabled on your account at VATSIM.

* Options: RSA / HMAC

*/

$sso['method'] = 'RSA';

 

/*

* Your RSA **PRIVATE** key

* If you are not using RSA, this value can be anything (or not set)

*/

$sso['cert'] = <<

-----BEGIN RSA PRIVATE KEY-----

MIIEowIBAAKCAQEAtHWe0DVmsY4oZWu7N4Xnv0QJQr/fpPDllEGzEFatcpXpIYkF

ZjvtCkyS/wz/q8ZUYF+gojzfrVA6gsu08ph61GlaFFYKTI+fJfNKxgK8YFHiO67b

bSUo1JhTURAM+0l5OB0ZfG9P7CcZuPp8CvRR/sWrq0D5dchw2XAG55BR1OoshH7V

iT93EZT5rIHKenSduZYcgjg0G6sJZUoSQJWJ5gM9CCdX8c16AL4V0ono+g0Liubr

CNji4vzlv2mlpcCXp280yPL87+AI7PDP/8IJJTD0lC5ziWLr81iIYKEUj8ZW6itp

g18HW35yO/Uh8jx5o9IFyyeeM8VvtGHBnC/x8QIDAQABAoIBAEcLW1eq/l/+kGbF

T/Je9Eq3dVHjCh/8etWwO9e92BEZdauvLw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qgwA3Ed0+PC05AB0wsHmBUxakAMerQQOLkotn9+10MnpaZ51KmuwV

qKqwSlZfUCpYDhdfv6aO24nirb0UHWoxQhU6h7vvUotRWxjzQRMR

-----END RSA PRIVATE KEY-----

EOD;

 

 

 

?>

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

In your second post you mentioned an error in /var/www/html/SSO.cl[Mod - Happy Thoughts].php, which suggested you're using the basic demo code (vatsim-sso-demo).

 

The config you've posted is from the Moodle files; you hadn't mentioned Moodle until now. Which code package are you trying to set up here?

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

that one is posted on getting started , and i did get it to work tho but yeah thanks for the help anyway

Link to comment
Share on other sites

Jamie Fox 811029
Posted
Posted

Sorry, I can't see where you mean - where on Getting Started did you find the code, and what code was it?

 

And please post the details of how you solved the problem, for the benefit of anyone reading this thread in future who may be having the same problem.

Link to comment
Share on other sites

samuel nygaard
Posted
Posted

alright i took the files from this one https://bitbucket.org/KHardern/vatsim-sso-demo/src pasted everything into php files insted of use the donwload from github and filled out the info sso scret key ,etc viewtopic.php?f=134&t=65319&p=469990 from this one and then advice ! i also installed curl for linux and php5 and thats how i resolve my issue

Link to comment
Share on other sites

 Share