- client_assertion_type: urn:ietf:params:oauth:client-assertion-type:jwt-bearer
- client_assertion: eyJ...
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
# すべてのユーザーに一括して会社電話番号での MFA を設定する | |
Get-MsolUser -All | ForEach { | |
$user = $_ | |
$mfa = $user.StrongAuthenticationMethod | |
# MFA が何も設定されていない | |
if (-not $mfa) { | |
$twoWayOfficeDefaultTrue = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod | |
$twoWayOfficeDefaultTrue.MethodType = "TwoWayVoiceOffice" | |
$twoWayOfficeDefaultTrue.IsDefault = $True |
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 ConvertFrom-CodeVerifier { | |
[OutputType([String])] | |
param( | |
[Parameter(Mandatory = $True, ValueFromPipeline = $True)] | |
[String]$codeVerifier, | |
[ValidateSet( | |
"plain", | |
"s256" | |
)]$Method = "s256" | |
) |
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
if ($(Get-WindowsFeature -Name Web-Application-Proxy).Installed) { | |
$hostName = (New-Object System.UriBuilder -ArgumentList (Get-WebApplicationProxyConfiguration).AdfsUrl).Host | |
$currentCertHash = (Get-WebApplicationProxySslCertificate | Where-Object { $_.HostName -eq $hostName } | Select-Object -First 1 ).CertificateHash | |
$currentCert = Get-ChildItem cert:\localmachine\my | Where-Object { $_.Thumbprint -eq $currentCertHash } | |
if ($currentCert.NotAfter -lt (Get-Date).AddDays(30)) { | |
try { | |
$cert = Get-ChildItem cert:\LocalMachine\My\ | Where-Object { $_.Subject -eq "CN=$hostName" } | Sort-Object -Property NotAfter -Descending | Select-Object -First 1 ; | |
$certThumbprint = $cert.Thumbprint |
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
using System; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Collections.Generic; | |
using System.Security.Cryptography.X509Certificates; | |
using Microsoft.IdentityModel.JsonWebTokens; | |
using Microsoft.IdentityModel.Tokens; | |
namespace console | |
{ |
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> | |
</head> | |
<body> | |
<div class=""> | |
<h1> Div id="api" があるパターン </h1> | |
<div id="api"></div> | |
</div> | |
</body> |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>B2C JavaScript checker</title> | |
<script> | |
var f = function () { | |
var d = document.getElementById("footer-test"); |
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
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |