Editing CLOT Authentication

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
  
This page describes how [[CLOT]] creators can authenticate players on their website.  This means that when a player comes to your CLOT website, you can find out who they are on warzone.com.   
+
This page describes how [[CLOT]] creators can authenticate players on their website.  This means that when a player comes to your CLOT website, you can find out who they are on WarLight.net.   
  
 
If you want to allow players to perform actions on your CLOT (such as adding themselves, removing themselves, forming teams, etc.), using this authentication system is recommended.  However, it's possible to create a CLOT without authentication if you perform these kinds of actions yourself or trust players to do it correctly.
 
If you want to allow players to perform actions on your CLOT (such as adding themselves, removing themselves, forming teams, etc.), using this authentication system is recommended.  However, it's possible to create a CLOT without authentication if you perform these kinds of actions yourself or trust players to do it correctly.
Line 14: Line 14:
 
# Verify that both querystring parameters are present ('''token''' and '''clotpass''').
 
# Verify that both querystring parameters are present ('''token''' and '''clotpass''').
 
# Verify that the '''token''' in the querystring contains only numerical digits.
 
# Verify that the '''token''' in the querystring contains only numerical digits.
# Call Warzone's [[Validate invite token API]] with the '''token''' from the querystring.
+
# Call WarLight's [[Validate invite token API]] with the '''token''' from the querystring.
 
# Verify that the Validate Token API returns a '''clotpass''' field.
 
# Verify that the Validate Token API returns a '''clotpass''' field.
 
# Verify the '''clotpass''' in the querystring exactly matches the '''clotpass''' returned from the Validate Token API.
 
# Verify the '''clotpass''' in the querystring exactly matches the '''clotpass''' returned from the Validate Token API.
Line 26: Line 26:
 
It's important to redirect, both on success and failure, so that the clotpass isn't ever displayed in the user's address bar.  You don't want them to copy a URL with it and share it publicly without realizing it contains information they want to keep to themselves.  Redirecting ensures they don't accidentally share it.
 
It's important to redirect, both on success and failure, so that the clotpass isn't ever displayed in the user's address bar.  You don't want them to copy a URL with it and share it publicly without realizing it contains information they want to keep to themselves.  Redirecting ensures they don't accidentally share it.
  
=== Step 2: Register your log-in page with Warzone ===
+
=== Step 2: Register your log-in page with WarLight ===
  
# Visit the following page in your browser: https://www.warzone.com/CLOT/Config
+
# Visit the following page in your browser: https://www.warlight.net/CLOT/Config
 
# Type in the URL to your log-in page into the text box under CLOT Redirect Url (http://example.com/login in this example)
 
# Type in the URL to your log-in page into the text box under CLOT Redirect Url (http://example.com/login in this example)
 
# Click Save
 
# Click Save
  
=== Step 3: Link to Warzone's authentication page from your website ===
+
=== Step 3: Link to WarLight's authentication page from your website ===
  
# Visit, once again, the following page in your browser: https://www.warzone.com/CLOT/Config
+
# Visit, once again, the following page in your browser: https://www.warlight.net/CLOT/Config
 
# Copy your CLOT Authentication URL from this page
 
# Copy your CLOT Authentication URL from this page
 
# Provide a "Sign In" link on your website that points at your CLOT Authentication URL.
 
# Provide a "Sign In" link on your website that points at your CLOT Authentication URL.
  
Players who click your Sign In link will be redirected back to your login page with their token and clotpass added.  This CLOT Authentication URL is also suitable for sharing on the Warzone forums or anywhere else you'd like to attract players.
+
Players who click your Sign In link will be redirected back to your login page with their token and clotpass added.  This CLOT Authentcation URL is also suitable for sharing on the WarLight forums or anywhere else you'd like to attract players.
  
 
== Optional: State parameter ==
 
== Optional: State parameter ==
Line 46: Line 46:
 
For example, say you wanted to run two ladders from the same site, a 1v1 ladder and a 2v2 ladder.  You may wish to provide a link that directly joins a player to your 1v1 ladder.  However, your log-in page wouldn't know which ladder to join the player to.
 
For example, say you wanted to run two ladders from the same site, a 1v1 ladder and a 2v2 ladder.  You may wish to provide a link that directly joins a player to your 1v1 ladder.  However, your log-in page wouldn't know which ladder to join the player to.
  
To fix this, append &state=1v1 to the end of your CLOT Authentication URL.  For example, https://www.warzone.com/CLOT/Auth?p=1234567&state=1v1.  Once the player is redirected, your log-in page will be called with this state, for example: http://example.com/login?token=12345&clotpass=asdfg&state=1v1.  Your code can look for this '''state''' parameter and parse its meaning.
+
To fix this, append &state=1v1 to the end of your CLOT Authentication URL.  For example, https://www.warlight.net/CLOT/Auth?p=1234567&state=1v1.  Once the player is redirected, your log-in page will be called with this state, for example: http://example.com/login?token=12345&clotpass=asdfg&state=1v1.  Your code can look for this '''state''' parameter and parse its meaning.
  
[[Category:CLOT]]
+
[[:Category:CLOT]]

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox