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
// https://github.com/auth0-community/auth0-xamarin-oidc-samples/tree/master/Quickstart/01-Login/iOS | |
using System; | |
using UIKit; | |
using Auth0.OidcClient; | |
using System.Text; | |
using LocalAuthentication; | |
using Foundation; | |
using Xamarin.Auth; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Auth0</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
</head> | |
<body> | |
<button id="lock_button">Lock</button> |
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
###--------Modules-------------------------------------------------------------# | |
import requests | |
import json | |
###--------Functions-----------------------------------------------------------# | |
clientId="nNVpnD0SxI1GI87ZvNiMOn1MOaWXw3gp" | |
clientSecret="--" | |
url="shayanmemari.au.auth0.com" | |
customer="testing-BFP1" |
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
// https://auth0.github.io/auth0.net/index.html | |
// https://auth0.github.io/auth0.net/api/Auth0.AuthenticationApi.Models.ClientCredentialsTokenRequest.html | |
public async void getapi2token(){ | |
var AuthAPI = new AuthenticationApiClient(new Uri("https://shayan-dev.au.auth0.com/")); | |
var api2Response = await AuthAPI.GetTokenAsync(new ClientCredentialsTokenRequest | |
{ | |
ClientId = "43BKVc57RgIiVJrbM8gRDIBQgofdByYe", | |
ClientSecret = "xxx", |
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
public handleAuthentication(): void { | |
this.auth0.parseHash({ | |
}, (err, authResult) => { | |
if (authResult && authResult.accessToken && authResult.idToken) { | |
console.log(authResult); | |
this.localLogin(authResult); | |
this.auth0.client.userInfo(authResult.accessToken, function (err, user) { | |
localStorage.setItem("user_id", user.sub); | |
console.log(user.sub); |
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 getByEmail(email, callback) { | |
//this example uses the "tedious" library | |
//more info here: http://pekim.github.io/tedious/index.html | |
const sqlserver = require('[email protected]'); | |
const Connection = sqlserver.Connection; | |
const Request = sqlserver.Request; | |
const TYPES = sqlserver.TYPES; | |
var user_profile = []; |
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
public handleAuthentication(): void { | |
this.auth0.parseHash({}, (err, authResult) => { | |
if (authResult && authResult.accessToken && authResult.idToken) { | |
this.localLogin(authResult); | |
this.auth0.client.userInfo(authResult.accessToken, function (err, user) { | |
localStorage.setItem("user_id", user.sub); | |
}); | |
this.router.navigate(['/home']); |
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 (user, context, callback) { | |
var ManagementClient = require('[email protected]').ManagementClient; | |
let saml_name = `${user.first_name} ${user.last_name}`; | |
console.log(saml_name); | |
user.name = saml_name; | |
var management = new ManagementClient({ |
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
string[] UAs = { | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36", | |
"Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.18", | |
"Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Firefox/78.0", | |
"Opera/9.80 (Linux armv7l) Presto/2.12.407 Version/12.51 , D50u-D1-UHD/V1.5.16-UHD (Vizio, D50u-D1, Wireless)", | |
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0]" | |
}; |