Skip to content

Commit

Permalink
EPICENTER-4293. Change cookies to have samesite=none and secure flag …
Browse files Browse the repository at this point in the history
…set (#232)
  • Loading branch information
wglasshusain authored Mar 18, 2020
1 parent 3d9a85a commit 30b6008
Show file tree
Hide file tree
Showing 15 changed files with 3,634 additions and 3,591 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@
"beforeColon": false,
"afterColon": true
}],
"linebreak-style": 2,

// do not check linebreaks for windows/unix compatibility
"linebreak-style": 0,
"lines-around-comment": [0, {
"beforeBlockComment": true
}],
Expand Down
90 changes: 49 additions & 41 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/assignment/assignment.min.js.map

Large diffs are not rendered by default.

188 changes: 94 additions & 94 deletions dist/components/assignment/index.html
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Multiplayer World Assignment Component</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://forio.com/tools/js-libs/2.10.0/components/assignment/assignment.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script>
</head>
<body>

<div class="container">
<div class="row">
<div class="col-xs-8">

</div>
</div>


<div class="row">
<div class="col-xs-12">
<div id="assignment-component">
<div class="row">
<div class="col-xs-12">
<span class="table-controls form-inline">
Automatically assign users

<span class="single" style="display: none;">
to teams. Users/Team:
</span>
<span class="dynamic" style="display: none;">
to worlds.
</span>
<span class="dynamic-no-roles-text" style="display: none;"> Max User/World: </span>
<span class="no-roles" style="display: none;">
<input type="number" class="form-control" id="max-users" min="1">
</span>

<button class="auto-assign-all btn btn-success">Assign</button>
</span>
<span class="status-widget pull-right">
<span id="users-status"><em class="icon f-icon"></em><span class="text"></span></span>
<span id="worlds-status"><em class="icon f-icon"></em><span class="text"></span></span>
</span>
</div>
</div>
<div class="component controls" style="opacity: 0;">
<button class="unassign-user btn">Unassign</button>
<button class="make-user-inactive btn">Make Inactive</button>
</div>
<table class="table users-table">
<thead>
<tr>
<th><input type="checkbox" id="select-all"></th>
<th></th>
<th>World</th>
<th>Role</th>
<th>Name</th>
<th>Username</th>
<th>Unassigned</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>

</div>
</div>
</div>
<!-- make sure to include jquery, epicenter.js and assignment.js -->
<script src="https://forio.com/tools/js-libs/2.10.0/epicenter.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.10.0/components/assignment/assignment.js"></script>
<script>
new window.forio.MultiplayerAssignmentComponent({
el: '#assignment-component',
account: 'your-account-goes-here',
project: 'your-project-name-goes-here',
group: 'the-group-name-goes-here',
groupId: 'the-group-id-goes-here',
token: 'the-authentication-token-goes-here',
server: {
host: 'the-server-goes-here usually api.forio.com',
protocol: 'https'
}
}).load();

</script>
</body>
</html>
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Multiplayer World Assignment Component</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://forio.com/tools/js-libs/2.13.0/components/assignment/assignment.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script>
</head>
<body>

<div class="container">
<div class="row">
<div class="col-xs-8">

</div>
</div>


<div class="row">
<div class="col-xs-12">
<div id="assignment-component">
<div class="row">
<div class="col-xs-12">
<span class="table-controls form-inline">
Automatically assign users

<span class="single" style="display: none;">
to teams. Users/Team:
</span>
<span class="dynamic" style="display: none;">
to worlds.
</span>
<span class="dynamic-no-roles-text" style="display: none;"> Max User/World: </span>
<span class="no-roles" style="display: none;">
<input type="number" class="form-control" id="max-users" min="1">
</span>

<button class="auto-assign-all btn btn-success">Assign</button>
</span>
<span class="status-widget pull-right">
<span id="users-status"><em class="icon f-icon"></em><span class="text"></span></span>
<span id="worlds-status"><em class="icon f-icon"></em><span class="text"></span></span>
</span>
</div>
</div>
<div class="component controls" style="opacity: 0;">
<button class="unassign-user btn">Unassign</button>
<button class="make-user-inactive btn">Make Inactive</button>
</div>
<table class="table users-table">
<thead>
<tr>
<th><input type="checkbox" id="select-all"></th>
<th></th>
<th>World</th>
<th>Role</th>
<th>Name</th>
<th>Username</th>
<th>Unassigned</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>

</div>
</div>
</div>
<!-- make sure to include jquery, epicenter.js and assignment.js -->
<script src="https://forio.com/tools/js-libs/2.13.0/epicenter.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.13.0/components/assignment/assignment.js"></script>
<script>
new window.forio.MultiplayerAssignmentComponent({
el: '#assignment-component',
account: 'your-account-goes-here',
project: 'your-project-name-goes-here',
group: 'the-group-name-goes-here',
groupId: 'the-group-id-goes-here',
token: 'the-authentication-token-goes-here',
server: {
host: 'the-server-goes-here usually api.forio.com',
protocol: 'https'
}
}).load();

</script>
</body>
</html>
130 changes: 65 additions & 65 deletions dist/components/login/index.html
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- the inserted pop over is compatible with bootstrap classes, so optionally you can include bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">

<!-- login.css provides styling for the group selector pop over dialog -->
<link rel="stylesheet" href="https://forio.com/tools/js-libs/2.10.0/components/login/login.css">

<!-- make sure to include jquery, epicenter.js and login.js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.10.0/epicenter.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.10.0/components/login/login.js"></script>
</head>
<body>
<!--
The main login form. Make sure you make the id="login". Also you can specify a
page to redirect to after logging in using the action property.
Inside the form, specify the username and password fields that the JavaScript
will use as credentials to login. Optionally you can specify an account
and project to override the url.
The login action happens on the submit event for the form.
-->
<input type="hidden" id="fac-redirect-page" />
<form id="login" action="simulation.html">
<div>
<h4 class="text-center">Please Login to this Simulation</h4>
<hr>
<div class="form-group control">
<label for="username">Username</label>
<input id="username" type="text" class="form-control">
</div>
<div class="form-group control">
<label for="password">Password</label>
<input id="password" type="password" class="form-control">
</div>
<div class="form-group control hidden mfa">
<label for="mfaCode"> Authentication Code</label>
<input id="mfaCode" type="number" class="form-control" />
<p class="help-block">
This account has two-factor authentication enabled. Use your Authenticator app to view your Authentication Code.
</p>
</div>
<!-- account and project fields are optional, normally account/project are extracted from the url -->
<input type="hidden" id="account">
<input type="hidden" id="project">

<div class="control">
<label for="">&nbsp;</label><button class="btn btn-signin pull-right" type="submit">Login</button>
</div>
<!-- add a login-message div if you want to display login failed errors (e.g. wrong username or password) -->
<div id="login-message" class="alert alert-danger" style="display:none;"></div>
</div>
</form>
<div class="powered-by"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- the inserted pop over is compatible with bootstrap classes, so optionally you can include bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">

<!-- login.css provides styling for the group selector pop over dialog -->
<link rel="stylesheet" href="https://forio.com/tools/js-libs/2.13.0/components/login/login.css">

<!-- make sure to include jquery, epicenter.js and login.js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.13.0/epicenter.min.js"></script>
<script src="https://forio.com/tools/js-libs/2.13.0/components/login/login.js"></script>
</head>
<body>
<!--
The main login form. Make sure you make the id="login". Also you can specify a
page to redirect to after logging in using the action property.
Inside the form, specify the username and password fields that the JavaScript
will use as credentials to login. Optionally you can specify an account
and project to override the url.
The login action happens on the submit event for the form.
-->
<input type="hidden" id="fac-redirect-page" />
<form id="login" action="simulation.html">
<div>
<h4 class="text-center">Please Login to this Simulation</h4>
<hr>
<div class="form-group control">
<label for="username">Username</label>
<input id="username" type="text" class="form-control">
</div>
<div class="form-group control">
<label for="password">Password</label>
<input id="password" type="password" class="form-control">
</div>
<div class="form-group control hidden mfa">
<label for="mfaCode"> Authentication Code</label>
<input id="mfaCode" type="number" class="form-control" />
<p class="help-block">
This account has two-factor authentication enabled. Use your Authenticator app to view your Authentication Code.
</p>
</div>
<!-- account and project fields are optional, normally account/project are extracted from the url -->
<input type="hidden" id="account">
<input type="hidden" id="project">

<div class="control">
<label for="">&nbsp;</label><button class="btn btn-signin pull-right" type="submit">Login</button>
</div>
<!-- add a login-message div if you want to display login failed errors (e.g. wrong username or password) -->
<div id="login-message" class="alert alert-danger" style="display:none;"></div>
</div>
</form>
<div class="powered-by"></div>
</body>
</html>
Loading

0 comments on commit 30b6008

Please sign in to comment.