Skip to content
Snippets Groups Projects
Commit f5b87b45 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

cleanup

parent 65a89e3c
No related branches found
No related tags found
No related merge requests found
......@@ -24,38 +24,4 @@ func main() {
httpClient.Init()
server.Start()
//st := supertoken.NewSuperToken("ggggggggggggggggggggggg", "https://oidc.issuer.data.kit.edu/long/url/i/test/how/long/the/token/will/get", restrictions.Restrictions{{UsagesAT: 1, Audiences: []string{"https://some.service.data.kit.edu/"}, Scope: "compute store read write"}}, capabilities.Capabilities{"AT"})
//jwt, _ := st.ToJWT()
//fmt.Printf("%s\n", jwt)
// st, err := supertoken.NewSuperTokenEntry("testToken", "gabriel", "wlcg", restrictions.Restrictions{
// {
// NotBefore: 1599939600,
// ExpiresAt: 1599948600,
// IPs: []string{"192.168.0.31"},
// UsagesAT: 10,
// }, {
// NotBefore: 1599939600,
// ExpiresAt: 1599940600,
// Scope: "storage",
// },
// }, capabilities.Capabilities{"AT", "create_super_token"})
// if err != nil {
// panic(err)
// }
// jwt, err := st.Token.ToJWT()
// if err != nil {
// fmt.Println(err)
// } else {
// fmt.Println(jwt)
// fmt.Println()
// st, err := supertoken.ParseJWT(jwt)
// if err != nil {
// fmt.Println(err)
// } else {
// fmt.Printf("%+v\n", st)
// }
// }
// fmt.Println()
}
......@@ -5,11 +5,10 @@ import (
"errors"
"time"
log "github.com/sirupsen/logrus"
"github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"github.com/zachmann/mytoken/internal/db"
"github.com/zachmann/mytoken/internal/model"
"github.com/zachmann/mytoken/internal/supertoken/capabilities"
......
......@@ -4,10 +4,6 @@ import (
"encoding/json"
"strings"
"github.com/zachmann/mytoken/internal/utils/dbUtils"
"github.com/zachmann/mytoken/internal/supertoken/restrictions"
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"github.com/zachmann/mytoken/internal/config"
......@@ -19,8 +15,10 @@ import (
eventService "github.com/zachmann/mytoken/internal/supertoken/event"
event "github.com/zachmann/mytoken/internal/supertoken/event/pkg"
supertoken "github.com/zachmann/mytoken/internal/supertoken/pkg"
"github.com/zachmann/mytoken/internal/supertoken/restrictions"
"github.com/zachmann/mytoken/internal/utils"
"github.com/zachmann/mytoken/internal/utils/ctxUtils"
"github.com/zachmann/mytoken/internal/utils/dbUtils"
"github.com/zachmann/mytoken/internal/utils/oidcUtils"
)
......
......@@ -3,9 +3,8 @@ package httpClient
import (
"time"
log "github.com/sirupsen/logrus"
"github.com/go-resty/resty/v2"
log "github.com/sirupsen/logrus"
"github.com/zachmann/mytoken/internal/config"
)
......
......@@ -3,10 +3,9 @@ package server
import (
"time"
"github.com/zachmann/mytoken/internal/endpoints"
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"github.com/zachmann/mytoken/internal/endpoints"
"github.com/zachmann/mytoken/internal/endpoints/configuration"
"github.com/zachmann/mytoken/internal/endpoints/redirect"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment