Skip to content

Commit

Permalink
Merge pull request #218 from guuurgle/master
Browse files Browse the repository at this point in the history
use https
  • Loading branch information
SmItH197 committed Apr 6, 2018
2 parents 82ed70b + a5221b7 commit 2cef740
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion steamauth/SteamConfig.php
@@ -1,6 +1,6 @@
<?php
//Version 3.2
$steamauth['apikey'] = ""; // Your Steam WebAPI-Key found at http://steamcommunity.com/dev/apikey
$steamauth['apikey'] = ""; // Your Steam WebAPI-Key found at https://steamcommunity.com/dev/apikey
$steamauth['domainname'] = ""; // The main URL of your website displayed in the login page
$steamauth['logoutpage'] = ""; // Page to redirect to after a successfull logout (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!
$steamauth['loginpage'] = ""; // Page to redirect to after a successfull login (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!
Expand Down
4 changes: 2 additions & 2 deletions steamauth/steamauth.php
Expand Up @@ -21,14 +21,14 @@ function loginbutton($buttonstyle = "square") {
$openid = new LightOpenID($steamauth['domainname']);

if(!$openid->mode) {
$openid->identity = 'http://steamcommunity.com/openid';
$openid->identity = 'https://steamcommunity.com/openid';
header('Location: ' . $openid->authUrl());
} elseif ($openid->mode == 'cancel') {
echo 'User has canceled authentication!';
} else {
if($openid->validate()) {
$id = $openid->identity;
$ptn = "/^http:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/";
$ptn = "/^https?:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/";
preg_match($ptn, $id, $matches);

$_SESSION['steamid'] = $matches[1];
Expand Down
2 changes: 1 addition & 1 deletion steamauth/userInfo.php
@@ -1,7 +1,7 @@
<?php
if (empty($_SESSION['steam_uptodate']) or empty($_SESSION['steam_personaname'])) {
require 'SteamConfig.php';
$url = file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$steamauth['apikey']."&steamids=".$_SESSION['steamid']);
$url = file_get_contents("https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$steamauth['apikey']."&steamids=".$_SESSION['steamid']);
$content = json_decode($url, true);
$_SESSION['steam_steamid'] = $content['response']['players'][0]['steamid'];
$_SESSION['steam_communityvisibilitystate'] = $content['response']['players'][0]['communityvisibilitystate'];
Expand Down

0 comments on commit 2cef740

Please sign in to comment.