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
#!/bin/bash | |
clientId=xxx | |
clientSecret=xxx | |
login_hint=1001 | |
user_code=675325 | |
backchannelReq=`cat << EOS | |
curl http://localhost:8080/api/backchannel/authentication -X POST \ |
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 * as functions from 'firebase-functions' | |
import * as cookie from 'cookie' | |
// // Start writing Firebase Functions | |
// // https://firebase.google.com/docs/functions/typescript | |
// | |
export const addCookie = functions.https.onRequest((request, response) => { | |
response.setHeader('Cache-Control', 'private') // Hosting経由だと、これがないとset cookieが削除される | |
_addCookie(response, 'key', 'value') | |
response.send('Hello from Firebase!') |
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 nu.mine.kino.springboot; | |
/* | |
* Copyright 2012-2016 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
\left( | |
\begin{array}{c} | |
\cos\theta\\ | |
\sin\theta | |
\end{array} | |
\right) |
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 nu.mine.kino; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Mac; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; | |
import org.apache.commons.codec.binary.Base64; |
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
@Data | |
@AllArgsConstructor | |
public class AccessTokenRequestParam { | |
private String redirect_url; | |
private String client_id; | |
private String client_secret; |
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 nu.mine.kino; | |
import java.text.ParseException; | |
import com.nimbusds.jose.JOSEException; | |
import com.nimbusds.jose.JWSAlgorithm; | |
import com.nimbusds.jose.JWSHeader; | |
import com.nimbusds.jose.JWSObject; | |
import com.nimbusds.jose.JWSVerifier; | |
import com.nimbusds.jose.KeyLengthException; |
NewerOlder