This file contains hidden or 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
| use std::cell::RefCell; | |
| use std::{collections::VecDeque, rc::Rc}; | |
| type NodeContainer = Rc<RefCell<Node>>; | |
| #[derive(Debug, Clone)] | |
| enum Object { | |
| User(String), | |
| Folder(String), | |
| Document(String), |
This file contains hidden or 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 main | |
| import ( | |
| "context" | |
| "fmt" | |
| "net" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "syscall" |
This file contains hidden or 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
| void main() async { | |
| final loginResult = await Auth0Client('brucke.auth0.com', 'client123').webAuthentication().login( | |
| audience: 'test', | |
| scopes: {'openid', 'profile', 'email'}, | |
| redirectUri: 'com.auth0.samples://flutter', | |
| idTokenValidationConfig: IdTokenValidationConfig(leeway: 60), | |
| organizationId: '1234', | |
| useEphemeralSession: true, | |
| parameters: {'screen_hint': 'signup'}); |
This file contains hidden or 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
| // SPA JS-like | |
| // Tries to implement pattern like: https://dart.academy/creational-design-patterns-for-dart-and-flutter-builder/ | |
| void main() { | |
| final client = Auth0WebClient( | |
| domain: 'test', clientId: 'test', audience: 'test', issuer: 'test'); | |
| client.loginWithRedirect(); | |
| } |
This file contains hidden or 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
| void main() { | |
| final auth0 = Auth0('elkdanger.eu.auth0.com', 'test'); | |
| // Must wrap cascade in brackets to get return result | |
| // of `start` | |
| final result = (WebAuth(auth0) | |
| ..audience = 'test' | |
| ..orgId = 'test') | |
| .start(); | |
This file contains hidden or 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
| void main() { | |
| final url = Auth0 | |
| .webAuth('elkdanger.eu.auth0.com', '123') | |
| .audience('test') | |
| .buildUrl(); | |
| print(url); | |
| } | |
| class WebAuth { |
This file contains hidden or 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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Organizations Example</title> | |
| </head> | |
| <body> | |
| <div> | |
| <form id="init-form"> |
This file contains hidden or 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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Test</title> | |
| </head> | |
| <body> | |
| <button id="login">Log in</button> |
This file contains hidden or 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
| const crypto = require('crypto') | |
| const base64url = require('base64-url') | |
| const encode = input => base64url.encode(input) | |
| const header = JSON.stringify({ | |
| alg: "HS256", | |
| "typ": "JWT" | |
| }) | |
| const payload = JSON.stringify({ |
This file contains hidden or 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
| using System; | |
| using System.Web.Mvc; | |
| using System.Web.Routing; | |
| namespace Models | |
| { | |
| public class RedirectToActionAnchor : RedirectToRouteResult | |
| { | |
| /// <summary> | |
| /// Gets or sets the action. |
NewerOlder