- authentication: verifying identity (
401 Unauthorized) - authorization: verifying permissions (
403 Forbidden)
Username/password scheme
- stateful (i.e. session using a cookie)
- stateless (i.e. token using
JWT/OAuth/ other)
| /** | |
| * Following is extracted from the content `https://github.com/aws-amplify/amplify-js/tree/master/packages/amazon-cognito-identity-js` | |
| */ | |
| import { CognitoUserPool, CognitoUser, CognitoUserAttribute, AuthenticationDetails } from 'amazon-cognito-identity-js' | |
| export class CognitoService { | |
| // Data of admin pool of cognito-user-pools | |
| // TODO: need to secure these |
| <!DOCTYPE html> | |
| <html amp lang="en-us"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> | |
| <link rel="canonical" href="canonical-url.com" /> | |
| <meta name="amp-experiments-opt-in" content="development"> | |
| <meta name="amp-experiment-token" |
| "use strict"; | |
| const gulp = require('gulp'); | |
| const sass = require('gulp-ruby-sass'); | |
| const prefix = require('gulp-autoprefixer'); | |
| const minifycss = require('gulp-minify-css'); | |
| const rename = require('gulp-rename'); | |
| const sourcemaps = require('gulp-sourcemaps'); | |
| const connect = require('gulp-connect'); | |
| const uglify = require('gulp-uglify'); |