Skip to content

Instantly share code, notes, and snippets.

@skiph
skiph / App.js
Last active April 27, 2018 17:21
RNDemo - Say Hello
import React from 'react';
import { View, Image, Text, Button, StyleSheet } from 'react-native';
import ShapeView from './ShapeView'
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {shape: 'logo',
status: ''};
}
module.exports = {
approov_token_secret: /* token secret received from Approov demo download */
'APPROOV DEMO TOKEN SECRET BASE64 STRING HERE',
google_client_secret: /* client secret received from Google */
'GOOGLE CLIENT SECRET HERE'
};
ext {
// google credentials
apiKey = "GOOGLE_API_KEY"
clientId = "GOOGLE_CLIENT_ID"
// google authorization adapter service
@skiph
skiph / enhanced nasa.js
Created May 4, 2017 05:37
API Key Proxy - enhanced API processing
const path = require('path');
const url = require('url');
const request = require('request');
const chalk = require('chalk');
// load api configuration and secrets
const config = require(`${__dirname}/../config.js`);
if (config.nasa_host == null) {
@skiph
skiph / modified config.js
Created May 4, 2017 04:23
API Proxy Key - modified for approov
module.exports = {
proxy_port: /* port the proxy listens on */
8080,
nasa_host: /* NASA API host */
'api.nasa.gov',
nasa_protocol: /* NASA API protocol */
'https:',
approov_header: /* Approov header name */
'approov',
approov_enforcement: /* set true to enforce token checks */