For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| package main | |
| import ( | |
| "exec" | |
| "log" | |
| "os" | |
| "syscall" | |
| "unsafe" | |
| ) |
| import com.google.inject.Inject; | |
| public class AuthenService { | |
| private final UserDAO userDAO; | |
| @Inject | |
| public AuthenService(UserDAO userDAO) { | |
| this.userDAO = userDAO; |
| import com.amazonaws.AmazonClientException; | |
| import com.amazonaws.AmazonServiceException; | |
| import com.amazonaws.AmazonWebServiceRequest; | |
| import com.amazonaws.ResponseMetadata; | |
| import com.amazonaws.regions.Region; | |
| import com.amazonaws.services.sqs.AmazonSQS; | |
| import com.amazonaws.services.sqs.model.*; | |
| import com.google.common.hash.Hashing; | |
| import java.util.*; |
| /* | |
| Serve is a very simple static file server in go | |
| Usage: | |
| -p="8100": port to serve on | |
| -d=".": the directory of static files to host | |
| Navigating to http://localhost:8100 will display the index.html or directory | |
| listing file. | |
| */ | |
| package main |
| package com.neolitec.examples; | |
| import org.apache.commons.codec.binary.Base64; | |
| import org.apache.commons.lang.StringUtils; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import javax.servlet.*; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
| package main | |
| /* | |
| URL: https://github.com/mccoyst/myip/blob/master/myip.go | |
| URL: http://changsijay.com/2013/07/28/golang-get-ip-address/ | |
| */ | |
| import ( | |
| "net" | |
| "os" |
Source document at: https://nginx.org/en/docs/http/ngx_http_core_module.html#variables
| Name | Description | Read only |
|---|
| error_page 500 /500.html; | |
| location /500.html{ | |
| return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}'; | |
| } | |
| error_page 502 /502.html; | |
| location /502.html{ | |
| return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}'; | |
| } |
| package com.alkhodiry.mb.rest.filters; | |
| import java.io.IOException; | |
| import javax.servlet.FilterChain; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import org.apache.commons.logging.Log; |