Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions IAM/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module github.com/h0ru5/apo/IAM

go 1.18

require (
github.com/abbot/go-http-auth v0.4.0
github.com/foomo/htpasswd v0.0.0-20200116085101-e3a90e78da9c
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
github.com/gorilla/mux v1.8.0
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103
github.com/sirupsen/logrus v1.9.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
)

require (
github.com/GehirnInc/crypt v0.0.0-20190301055215-6c0105aabd46 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
497 changes: 497 additions & 0 deletions IAM/go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions IAM/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"crypto/elliptic"
"crypto/rand"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/abbot/go-http-auth"
"github.com/dgrijalva/jwt-go"
"github.com/foomo/htpasswd"
"github.com/form3tech-oss/jwt-go"
"github.com/gorilla/mux"
"github.com/mendsley/gojwk"
log "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"net/http"
Expand Down Expand Up @@ -88,7 +88,7 @@ var GetTokenHandler = auth.AuthenticatedHandlerFunc(func(w http.ResponseWriter,

claims := jwt.StandardClaims{
Subject: r.Username,
Audience: viper.GetString("audience"),
Audience: []string{viper.GetString("audience")},
ExpiresAt: time.Now().Add(time.Hour * 24).Unix(),
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ defaults to `"myhome"`
```
"github.com/Sirupsen/logrus"
"github.com/abbot/go-http-auth"
"github.com/dgrijalva/jwt-go"
"github.com/foomo/htpasswd"
"github.com/form3tech-oss/jwt-go"
"github.com/gorilla/mux"
"github.com/mendsley/gojwk"
"github.com/spf13/pflag"
Expand All @@ -55,8 +55,8 @@ defaults to `"myhome"`
```
github.com/Sirupsen/logrus MIT License
github.com/abbot/go-http-auth Apache License 2.0 (95%)
github.com/dgrijalva/jwt-go MIT License (98%)
github.com/foomo/htpasswd MIT License
github.com/form3tech-oss/jwt-go MIT License (98%)
github.com/fsnotify/fsnotify BSD 3-clause "New" or "Revised" License (96%)
github.com/gorilla/mux BSD 3-clause "New" or "Revised" License (96%)
github.com/h0ru5/hmauth/IAM MIT License (98%)
Expand Down
31 changes: 31 additions & 0 deletions manageentries/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module github.com/h0ru5/apo/manageentries

go 1.18

require (
github.com/foomo/htpasswd v0.0.0-20200116085101-e3a90e78da9c
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.12.0
)

require (
github.com/GehirnInc/crypt v0.0.0-20190301055215-6c0105aabd46 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
490 changes: 490 additions & 0 deletions manageentries/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manageentries/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package main

import "github.com/h0ru5/hmauth/manageentries/cmd"
import "github.com/h0ru5/apo/manageentries/cmd"

func main() {
cmd.Execute()
Expand Down
33 changes: 33 additions & 0 deletions resource/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module github.com/h0ru5/apo/resource

go 1.18

require (
github.com/auth0/go-jwt-middleware v1.0.1
github.com/codegangsta/negroni v1.0.0
github.com/form3tech-oss/jwt-go v3.2.2+incompatible
github.com/gorilla/context v1.1.1
github.com/gorilla/mux v1.8.0
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103
github.com/sirupsen/logrus v1.9.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
)

require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
Loading