ID no longer hard coded into discord oauth2 links.

This commit is contained in:
NovaFox161
2017-12-19 13:19:37 -06:00
parent 27dffa1257
commit 6b040d869e
9 changed files with 18 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
package com.cloudcraftgaming.discal.web.handler;
import com.cloudcraftgaming.discal.api.object.BotSettings;
import com.cloudcraftgaming.discal.api.utils.GuildUtils;
import java.util.HashMap;
@@ -40,6 +41,7 @@ public class DiscordAccountHandler {
//Not logged in...
Map m = new HashMap();
m.put("loggedIn", false);
m.put("client", BotSettings.ID.get());
return m;
}
}

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -32,8 +32,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -32,8 +32,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">

View File

@@ -31,8 +31,8 @@
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
<!--TODO: Change this when bot goes live to proper auth url-->
<a class="account" th:unless="${loggedIn}"
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
in</a>
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
In</a>
</div>
<div id="content">