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
| var express = require('express'); | |
| var router = express.Router(); | |
| var passport = require('passport'); | |
| // To return the user data to the client | |
| router.get("/check", (req, res) => { | |
| console.log("user - " + req.user); | |
| console.log(req.session.passport); | |
| if (req.user === undefined) { | |
| res.json({}); |
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
| var cookieSession = require('cookie-session'); | |
| var passport = require('passport'); | |
| const passportSetup = require('./config/passport-setup'); | |
| var authRouter = require('./routes/auth-routes'); | |
| app.use('/auth', authRouter); | |
| var mongoose = require("mongoose"); |
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 mongoose = require("mongoose"); | |
| const Schema = mongoose.Schema; | |
| const userSchema = new Schema({ | |
| username: String, | |
| name: String, | |
| githubId: String, | |
| image: 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
| const passport = require("passport"); | |
| var GitHubStrategy = require("passport-github2").Strategy; | |
| const User = require("../models/user-model"); | |
| // Passport takes that user id and stores it internally on | |
| // req.session.passport which is passport’s internal | |
| // mechanism to keep track of things. | |
| passport.serializeUser((user, done) => { | |
| done(null, user.id); | |
| }); |
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
| <template> | |
| <div class="hello"> | |
| <a href="http://localhost:3000/auth/github"> | |
| <button>Sign-In With Github</button> | |
| </a> | |
| </div> | |
| </template> | |
| <script> | |
| import axios from "axios"; |
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 template = document.createElement('template'); | |
| template.innerHTML = ` | |
| <div> | |
| Hello Weather App | |
| </div> | |
| ` | |
| class WeatherCard extends HTMLElement { | |
| constructor() { |
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
| // GetCurrent_Context returns the name of the currently selected context | |
| func GetCurrent_Context(svcContext *servicecontext.Context, localizer localize.Localizer) (*servicecontext.ServiceConfig, error) { | |
| if svcContext.CurrentContext == "" { | |
| return nil, localizer.MustLocalizeError("context.common.error.notSet") | |
| } | |
| currCtx, ok := svcContext.Contexts[svcContext.CurrentContext] | |
| if !ok { | |
| return nil, localizer.MustLocalizeError("context.common.error.context.notFound", localize.NewEntry("Name", svcContext.CurrentContext)) |
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
| { | |
| "type" : "record", | |
| "name" : "Tweet", | |
| "fields" : [ | |
| { | |
| "name" : "user", | |
| "type" : "string" | |
| }, | |
| { | |
| "name" : "text", |
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
| { | |
| "swagger":"2.0", | |
| "info":{ | |
| "description":"This is a sample server Petstore server via JSON.", | |
| "version":"1.0.0", | |
| "title":"Swagger Petstore (JSON)", | |
| "termsOfService":"http://helloreverb.com/terms/", | |
| "contact":{ | |
| "email":"[email protected]" | |
| }, |
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
| KAFKA_HOST= | |
| RHOAS_SERVICE_ACCOUNT_CLIENT_ID= | |
| RHOAS_SERVICE_ACCOUNT_CLIENT_SECRET= |
OlderNewer