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
# Following automation variables should be created under respective automation account | |
$AksClusterName = Get-AutomationVariable -Name 'av-aks-cluster-name' | |
$AksClusterResourceGroup = Get-AutomationVariable -Name 'av-aks-cluster-resource-group' | |
function Login-ToAzure { | |
Disable-AzContextAutosave -Scope Process | Out-Null | |
try { | |
$AzureContext = (Connect-AzAccount -Identity).Context | |
} catch { |
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
package com.sample.handlers; | |
import java.util.List; | |
import java.util.Map; | |
import org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException; | |
import org.wso2.carbon.identity.application.authentication.framework.handler.provisioning.impl.SystemRolesRetainedProvisionHandler; | |
import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; | |
/** |
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
{ | |
"name": "socket-http", | |
"version": "1.0.0", | |
"description": "a simple http socket server", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "athiththan11", | |
"license": "ISC" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<sequence name="oauth2-enhanced-sequence" xmlns="http://ws.apache.org/ns/synapse"> | |
<!-- retreiving the access token and the generated time if exists in the registry location --> | |
<property name="stored-token" expression="get-property('registry', 'gov:/oauth_endpoint/access_token')" scope="default" type="STRING" /> | |
<property name="generated-time" expression="get-property('registry', 'gov:/oauth_endpoint/generated_time')" scope="default" type="LONG" /> | |
<!-- token generation to the oauth server's token endpoint --> | |
<!-- add the base64 encoded credentials --> | |
<property name="client-authorization-header" scope="default" type="STRING" value="MDZsZ3BTMnh0enRhOXBsaXZGUzliMnk4aEZFYTpmdE4yWTdLcnE2SWRsenBmZ1RuTVU1bkxjUFFh" /> | |
<property name="request-body" expression="json-eval($)" scope="default" type="STRING" /> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<sequence name="oauth2-sequence" xmlns="http://ws.apache.org/ns/synapse"> | |
<!-- token generation to the oauth server's token endpoint --> | |
<!-- add the base64 encoded credentials --> | |
<property name="client-authorization-header" scope="default" type="STRING" value="MDZsZ3BTMnh0enRhOXBsaXZGUzliMnk4aEZFYTpmdE4yWTdLcnE2SWRsenBmZ1RuTVU1bkxjUFFh" /> | |
<property name="request-body" expression="json-eval($)" scope="default" type="STRING" /> | |
<property name="resource" expression="get-property('axis2', 'REST_URL_POSTFIX')" scope="default" type="STRING" /> | |
<!-- creating a request payload for client_credentials --> | |
<payloadFactory media-type="xml"> |
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
package com.sample.token; | |
import org.apache.oltu.oauth2.common.exception.OAuthSystemException; | |
import org.wso2.carbon.apimgt.api.APIManagementException; | |
import org.wso2.carbon.apimgt.api.model.Application; | |
import org.wso2.carbon.apimgt.impl.APIConstants; | |
import org.wso2.carbon.apimgt.impl.utils.APIUtil; | |
import org.wso2.carbon.apimgt.keymgt.issuers.APIMTokenIssuer; | |
import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext; | |
import org.wso2.carbon.identity.oauth2.model.RequestParameter; |
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
Something: | |
type: object | |
required: | |
- something | |
- message | |
properties: | |
something: | |
type: integer | |
format: int32 | |
message: |
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
@consumer-key = <Replace with Consumer Key> | |
@consumer-secret = <Replace with Consumer Secret> | |
@api-hostname = https://10.100.5.220:8244/dev-management/v1.0.0 | |
# Username & Password | |
@api-username = admin | |
@api-password = admin | |
@username = athiththan11 |
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
@hostname = https://localhost:8243/dev-management | |
@username = athiththan11 | |
### Get Developer | |
# @name getDeveloper | |
curl -k -X GET {{hostname}}/devs/{{username}} \ | |
-H "Content-Type: application/json" | |
### Get Repos of a Developer | |
# @name getRepos |
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 passport = require('passport'); | |
var saml = require('passport-saml').Strategy; | |
// saml strategy for passport | |
var strategy = new saml( | |
{ | |
entryPoint: <provide SAML entry point url : https://localhost:9443/samlsso>, | |
issuer: <provide SAML issuer name : SampleExpressApp>, | |
protocol: <provide the protocol used : http://>, | |
logoutUrl: <provide the logout url : https://localhost:9443/samlsso>, |
NewerOlder