-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
235 additions
and
100 deletions.
There are no files selected for viewing
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
1 change: 0 additions & 1 deletion
1
Authentication/src/main/java/codes/antti/auth/authentication/AuthenticationDatabase.java
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
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
3 changes: 1 addition & 2 deletions
3
...ava/codes/antti/auth/common/Database.java → ...s/antti/auth/authentication/Database.java
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
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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Authorization</title> | ||
<style> | ||
html, body { | ||
background-color: #e4e4e7; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
font-family: | ||
-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, | ||
helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; | ||
font-size: 1.25em; | ||
line-height: 1.4; | ||
} | ||
.container { | ||
background-color: #d4d4d8; | ||
border-radius: 5px; | ||
padding: 12px; | ||
} | ||
.user-container { | ||
height: 40px; | ||
display: inline-block; | ||
background-color: #e4e4e7; | ||
border-radius: 5px; | ||
} | ||
.user-inner-container { | ||
height: 32px; | ||
display: flex; | ||
gap: 4px; | ||
margin: 4px 8px 4px 4px; | ||
align-items: center; | ||
} | ||
.user-inner-container img { | ||
border-radius: 5px; | ||
width: 32px; | ||
aspect-ratio: 1; | ||
} | ||
.user-inner-container span { | ||
display: inline-block; | ||
height: 40px; | ||
} | ||
.container p { | ||
margin: 2px; | ||
text-align: center; | ||
} | ||
.code { | ||
background-color: #a1a1aa; | ||
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; | ||
margin: 0; | ||
padding: 6px; | ||
border-radius: 5px; | ||
position: relative; | ||
} | ||
button { | ||
all: unset; | ||
background-color: #f87171; | ||
border-color: #e4e4e7; | ||
border-width: 5px; | ||
border-radius: 5px; | ||
color: white; | ||
font-weight: bold; | ||
font-size: 0.75em; | ||
padding: 2px 8px; | ||
margin: 16px 2px 2px; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="user-container"> | ||
<div class="user-inner-container"> | ||
<img src="https://mc-heads.net/avatar/{{uuid}}/32" alt="{{name}}'s player head"/> <span>{{name}}</span> | ||
</div> | ||
</div> | ||
<p> | ||
You are not authorized to use the application at <span class="code">{{host}}</span>.<br> | ||
This requires the <span class="code">{{permission}}</span> permission node. <br> | ||
<a href="/authentication-outpost/logout"><button>Logout</button></a> <a href="/authentication-outpost/logout/all"><button>Logout all browsers</button></a> | ||
</p> | ||
</div> | ||
<script> | ||
setInterval(() => { | ||
fetch("./auth") | ||
.then(res => { | ||
if (res.status === 200) window.location.reload(); | ||
}) | ||
.catch(() => null) | ||
}, 5 * 1000); | ||
</script> | ||
</body> | ||
</html> |
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.