-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format GDScript files using Razoric's formatter + manual review
- Loading branch information
1 parent
a165c7a
commit a73193c
Showing
41 changed files
with
3,314 additions
and
3,220 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
class_name FacebookProvider | ||
class_name FacebookProvider | ||
extends AuthProvider | ||
|
||
|
||
func _init(client_id: String, client_secret: String) -> void: | ||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
|
||
self.redirect_uri = "https://www.facebook.com/v13.0/dialog/oauth?" | ||
self.access_token_uri = "https://graph.facebook.com/v13.0/oauth/access_token" | ||
self.provider_id = "facebook.com" | ||
self.params.scope = "public_profile" | ||
self.params.state = str(rand_range(0, 1)) | ||
if OS.get_name() == "HTML5": | ||
self.should_exchange = false | ||
self.params.response_type = "token" | ||
else: | ||
self.should_exchange = true | ||
self.params.response_type = "code" | ||
|
||
|
||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
|
||
self.redirect_uri = "https://www.facebook.com/v13.0/dialog/oauth?" | ||
self.access_token_uri = "https://graph.facebook.com/v13.0/oauth/access_token" | ||
self.provider_id = "facebook.com" | ||
self.params.scope = "public_profile" | ||
self.params.state = str(rand_range(0, 1)) | ||
if OS.get_name() == "HTML5": | ||
self.should_exchange = false | ||
self.params.response_type = "token" | ||
else: | ||
self.should_exchange = true | ||
self.params.response_type = "code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
class_name GitHubProvider | ||
class_name GitHubProvider | ||
extends AuthProvider | ||
|
||
|
||
func _init(client_id: String, client_secret: String) -> void: | ||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
self.should_exchange = true | ||
self.redirect_uri = "https://github.com/login/oauth/authorize?" | ||
self.access_token_uri = "https://github.com/login/oauth/access_token" | ||
self.provider_id = "github.com" | ||
self.params.scope = "user:read" | ||
self.params.state = str(rand_range(0, 1)) | ||
self.params.response_type = "code" | ||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
self.should_exchange = true | ||
self.redirect_uri = "https://github.com/login/oauth/authorize?" | ||
self.access_token_uri = "https://github.com/login/oauth/access_token" | ||
self.provider_id = "github.com" | ||
self.params.scope = "user:read" | ||
self.params.state = str(rand_range(0, 1)) | ||
self.params.response_type = "code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
class_name GoogleProvider | ||
extends AuthProvider | ||
|
||
|
||
func _init(client_id: String, client_secret: String) -> void: | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
self.should_exchange = true | ||
self.redirect_uri = "https://accounts.google.com/o/oauth2/v2/auth?" | ||
self.access_token_uri = "https://oauth2.googleapis.com/token" | ||
self.provider_id = "google.com" | ||
self.params.response_type = "code" | ||
self.params.scope = "email openid profile" | ||
self.params.response_type = "code" | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
self.should_exchange = true | ||
self.redirect_uri = "https://accounts.google.com/o/oauth2/v2/auth?" | ||
self.access_token_uri = "https://oauth2.googleapis.com/token" | ||
self.provider_id = "google.com" | ||
self.params.response_type = "code" | ||
self.params.scope = "email openid profile" | ||
self.params.response_type = "code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
class_name TwitterProvider | ||
class_name TwitterProvider | ||
extends AuthProvider | ||
|
||
|
||
var request_token_endpoint: String = "https://api.twitter.com/oauth/access_token?oauth_callback=" | ||
|
||
var oauth_header: Dictionary = { | ||
oauth_callback="", | ||
oauth_consumer_key="", | ||
oauth_nonce="", | ||
oauth_signature="", | ||
oauth_signature_method="HMAC-SHA1", | ||
oauth_timestamp="", | ||
oauth_version="1.0" | ||
oauth_callback = "", | ||
oauth_consumer_key = "", | ||
oauth_nonce = "", | ||
oauth_signature = "", | ||
oauth_signature_method = "HMAC-SHA1", | ||
oauth_timestamp = "", | ||
oauth_version = "1.0" | ||
} | ||
|
||
|
||
func _init(client_id: String, client_secret: String) -> void: | ||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
self.oauth_header.oauth_consumer_key = client_id | ||
self.oauth_header.oauth_nonce = OS.get_ticks_usec() | ||
self.oauth_header.oauth_timestamp = OS.get_ticks_msec() | ||
self.should_exchange = true | ||
self.redirect_uri = "https://twitter.com/i/oauth2/authorize?" | ||
self.access_token_uri = "https://api.twitter.com/2/oauth2/token" | ||
self.provider_id = "twitter.com" | ||
self.params.redirect_type = "redirect_uri" | ||
self.params.response_type = "code" | ||
self.params.scope = "users.read" | ||
self.params.state = str(rand_range(0, 1)) | ||
randomize() | ||
set_client_id(client_id) | ||
set_client_secret(client_secret) | ||
|
||
self.oauth_header.oauth_consumer_key = client_id | ||
self.oauth_header.oauth_nonce = OS.get_ticks_usec() | ||
self.oauth_header.oauth_timestamp = OS.get_ticks_msec() | ||
|
||
self.should_exchange = true | ||
self.redirect_uri = "https://twitter.com/i/oauth2/authorize?" | ||
self.access_token_uri = "https://api.twitter.com/2/oauth2/token" | ||
self.provider_id = "twitter.com" | ||
self.params.redirect_type = "redirect_uri" | ||
self.params.response_type = "code" | ||
self.params.scope = "users.read" | ||
self.params.state = str(rand_range(0, 1)) | ||
|
||
|
||
func get_oauth_params() -> String: | ||
var params: PoolStringArray = [] | ||
for key in self.oauth.keys(): | ||
params.append(key+"="+self.oauth.get(key)) | ||
return params.join("&") | ||
var params: PoolStringArray = [] | ||
for key in self.oauth.keys(): | ||
params.append(key + "=" + self.oauth.get(key)) | ||
return params.join("&") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.