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
/* | |
* Copyright (c) 2024 WSO2 LLC. (http://www.wso2.org) | |
* All rights reserved. | |
* | |
* This software is the property of WSO2 LLC. and its suppliers, if any. | |
* Dissemination of any information or reproduction of any material contained | |
* herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | |
* You may not alter or remove any copyright or other notice from copies of this content. | |
*/ |
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
// Adaptive script to allow access only via federation and block access via login and password | |
// Error page to redirect unauthorized users, | |
// can be either an absolute URL or relative URL to server root, or empty/null | |
// null/empty value will redirect to the default error page | |
var errorPage = ''; | |
// Additional query parameters to be added to the above URL. | |
// Hint: Use i18n keys for error messages | |
var errorPageParameters = { | |
'status': 'Unauthorized', |
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
var onLoginRequest = function(context) { | |
executeStep(1, { | |
onSuccess: function(context) { | |
var user = context.currentKnownSubject; | |
user.localClaims['http://wso2.org/claims/givenname'] = "test"; | |
user.localClaims['http://wso2.org/claims/entitlement'] = "Upon a hill, the sun does rise,Painting the world with golden skies. Nature's beauty, a gentle song, In every heart, it does belong."; | |
} | |
}); | |
}; |
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
import ballerina/http; | |
import ballerina/io; | |
import ballerina/lang.runtime; | |
# A service representing a network-accessible API | |
# bound to port `9090`. | |
# | |
# + hasRisk - Field Description | |
type RiskResponse record { | |
boolean hasRisk; |
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
var connectionMetaData = { | |
"url": "https://2599de0c-00bf-49f4-b922-505be18a8677-dev.e1-us-east-azure.choreoapis.dev/iraa/testnilukaasgardeo/1.0.0/risk", | |
"consumerKey": "<consumer key>", | |
"consumerSecret": "<consumer secret>", | |
}; | |
var onLoginRequest = function(context) { | |
executeStep(1, { | |
onSuccess: function (context) { |
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
# CI name | |
name: Cypress GitHub Actions | |
# The on key is used to define when | |
# the CI should be triggered, aka Event | |
on: | |
# When someone push or merge a pull request | |
# inside the master branch | |
push: | |
branches: |
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
describe('Successfully Sign-in to Asgardeo ', () => { | |
before(() => { | |
cy.window().then((win) => { | |
win.onbeforeunload = null; | |
}); | |
// Visit Asgardeo console | |
cy.visit("https://dev.console.asgardeo.io/", { | |
onBeforeLoad: (win) => { |
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
# CI name | |
name: Cypress GitHub Actions | |
# The on key is used to define when | |
# the CI should be triggered, aka Event | |
on: | |
# When someone push or merge a pull request | |
# inside the master branch | |
push: | |
branches: |
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
function learnJS() { | |
for(var i = 0 ; i < 5; i++) { | |
console.log(i) | |
} | |
} | |
learnJS(); |
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
/// <reference types="cypress" /> | |
describe('Cypress Test Automation with then command', () => { | |
const log = console.log | |
it('then functionality example', () => { | |
/** | |
* then() calls the passed anonymous functions | |
*/ | |
cy.then(() => log("The basic with then command")); |
NewerOlder