Skip to content

Commit

Permalink
minor environment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoHernandez-QA committed Nov 29, 2024
1 parent f34bdd0 commit c836525
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
8 changes: 8 additions & 0 deletions 1-Authentication/1-sign-in/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Node
node_modules/

# Cypress
cypress/screenshots/

# Environments
cypress.env.json
12 changes: 6 additions & 6 deletions 1-Authentication/1-sign-in/App/authConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

const msalConfig = {
auth: {
clientId: 'Enter_the_Application_Id_Here', // This is the ONLY mandatory field that you need to supply.
authority: 'https://login.microsoftonline.com/Enter_the_Tenant_Info_Here', // Defaults to "https://login.microsoftonline.com/common"
clientId: '8a3f1e7b-284f-48a4-85d0-60fc62280148', // Enter_the_Application_Id_Here - This is the ONLY mandatory field that you need to supply.
authority: 'https://login.microsoftonline.com/5db860bd-0c26-4a06-9834-7fe6c8d30cf1', // Enter_the_Tenant_Info_Here - Defaults to "https://login.microsoftonline.com/common"
redirectUri: '/', // You must register this URI on Azure Portal/App Registration. Defaults to window.location.href e.g. http://localhost:3000/
navigateToLoginRequestUrl: true, // If "true", will navigate back to the original request location before processing the auth code response.
},
Expand Down Expand Up @@ -55,10 +55,10 @@ const loginRequest = {
* between applications by providing a "login_hint" property.
*/

// const silentRequest = {
// scopes: ["openid", "profile"],
// loginHint: "[email protected]"
// };
const silentRequest = {
scopes: ["openid", "profile"],
loginHint: "[email protected]"
};

// exporting config object for jest
if (typeof exports !== 'undefined') {
Expand Down
23 changes: 13 additions & 10 deletions 1-Authentication/1-sign-in/App/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
<link rel="stylesheet" href="./styles.css">


<!-- msal.min.js can be used in the place of msal.js; included msal.js to make debug easy -->
<!-- msal.min.js can be used in the place of msal.js; included msal.js to make debug easy integrity_no="sha384-BO4qQ2RTxj2akCJc7t6IdU9aRg6do4LGIkVVa01Hm33jxM+v2G+4q+vZjmOCywYq"-->
<script id="load-msal" src="https://alcdn.msauth.net/browser/2.31.0/js/msal-browser.js"
integrity="sha384-BO4qQ2RTxj2akCJc7t6IdU9aRg6do4LGIkVVa01Hm33jxM+v2G+4q+vZjmOCywYq"
crossorigin="anonymous"></script>

<!-- adding Bootstrap 5 for UI components -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<!-- adding Bootstrap 5 for UI components integrity_no="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
</head>

<body>
Expand Down Expand Up @@ -48,22 +47,26 @@ <h5 id="welcome-div" class="card-header text-center d-none"></h5>
head over to the <a href='https://jwt.ms/' target=”_blank”>jwt.ms</a></p>
</div>

<!-- importing bootstrap.js and supporting js libraries -->
<!-- importing bootstrap.js and supporting js libraries integrity_no="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
<!-- integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" crossorigin="anonymous"></script>

<!--integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>


<!-- importing app scripts (load order is important) -->
<script type="text/javascript" src="./authConfig.js"></script>
<script type="text/javascript" src="./ui.js"></script>

<!-- <script type="text/javascript" src="./authRedirect.js"></script> -->
<!-- Was commented -->
<script type="text/javascript" src="./authRedirect.js"></script>
<!-- uncomment the above line and comment the line below if you would like to use the redirect flow -->
<script type="text/javascript" src="./authPopup.js"></script>
<!-- <script type="text/javascript" src="./authPopup.js"></script> -->
</body>

</html>
4 changes: 2 additions & 2 deletions 1-Authentication/1-sign-in/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const app = express();
*/
const limiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes)
max: 1000000, // Limit each IP to 100 requests per `window` (here, per 15 minutes)
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
});


// Apply the rate limiting middleware to all requests
app.use(limiter);
//app.use(limiter);


// Configure morgan module to log all requests.
Expand Down

0 comments on commit c836525

Please sign in to comment.