Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove passwd and keygen, update deps, configs #16

Merged
merged 1 commit into from
Aug 29, 2024
Merged
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
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repos:
- id: trailing-whitespace
exclude: jsonschema/api-docs.md
- id: detect-private-key
exclude: 'pkg/tokens/testdata/.*'
- repo: https://github.com/google/yamlfmt
rev: v0.13.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[files]
extend-exclude = ["db","internal/ent/generated/**","go.mod","go.sum","pkg/testutils/","pkg/passwd/","pkg/tokens/testdata/","pkg/tokens/expires_test.go","internal/graphapi/tools_test.go","internal/httpserve/handlers/tools_test.go","pkg/keygen/auth_test.go","pkg/utils/oas/","pkg/keygen/crypto_test.go","pkg/auth/auth_test.go"]
extend-exclude = ["db","internal/ent/generated/**","go.mod","go.sum","pkg/testutils/","internal/graphapi/tools_test.go","internal/httpserve/handlers/tools_test.go"]
ignore-hidden = true
ignore-files = true
ignore-dot = true
Expand All @@ -17,4 +17,4 @@ identifier-leading-digits = false
locale = "en"
extend-ignore-identifiers-re = []
extend-ignore-words-re = ["(?i)requestor","(?i)indentity","(?i)encrypter","(?i)seeked","(?i)generater"]
extend-ignore-re = ["#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"]
extend-ignore-re = ["(?Rm)^.*//\\s*spellchecker:disable-line$"]
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ require (
github.com/theopenlane/entx v0.1.4
github.com/theopenlane/gqlgen-plugins v0.1.0
github.com/theopenlane/httpsling v0.1.0
github.com/theopenlane/iam v0.1.5
github.com/theopenlane/utils v0.1.3
github.com/theopenlane/iam v0.1.6
github.com/theopenlane/utils v0.1.4
github.com/tursodatabase/libsql-client-go v0.0.0-20240812094001-348a4e45b535
github.com/vektah/gqlparser/v2 v2.5.16
github.com/wundergraph/graphql-go-tools v1.67.4
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,10 @@ github.com/theopenlane/gqlgen-plugins v0.1.0 h1:DL3knGQ+pcoXceSFvmgWzzlgIyPRgl71
github.com/theopenlane/gqlgen-plugins v0.1.0/go.mod h1:sP0nCjrE3KoVT4qfYqMrSK1XZa3Bx2oTIRSdEF7F5l0=
github.com/theopenlane/httpsling v0.1.0 h1:IHWUSo213stJTmHOHjNIg5b3npgpchzMdPMY7jAkimI=
github.com/theopenlane/httpsling v0.1.0/go.mod h1:wOyNfO4moIbmP4stQc9Kasgp+Q4sODo3LOLwvjUe/PA=
github.com/theopenlane/iam v0.1.5 h1:CreDFrl8hLTpdQJcs/gFbkk8EuOFClGCClIpCUxPrOg=
github.com/theopenlane/iam v0.1.5/go.mod h1:KZd/k1nEHSzS9wQeQHLqRabJuH3XkF5g8aGqzRhjSmQ=
github.com/theopenlane/utils v0.1.3 h1:ankd7gtxOMC1xvRike13+Q2oI7paBSKu9Z8fUujdd50=
github.com/theopenlane/utils v0.1.3/go.mod h1:gX64mPxANzaIc1GCgtAueWGDZVsKXiMyQF9oxTrDdVg=
github.com/theopenlane/iam v0.1.6 h1:ps6xLXHpnGy687uLPRZiD7034DRVqaWEfJLCJVMx95o=
github.com/theopenlane/iam v0.1.6/go.mod h1:mOtYjuqUD7SX4EkwXFAYwf8+mwPDsRvTsLhAngqVIxM=
github.com/theopenlane/utils v0.1.4 h1:G2hrRBOugS2VvdqumBMrp2uSjulwbJMt8QO0EpwKm7g=
github.com/theopenlane/utils v0.1.4/go.mod h1:aFHkhJKNMGcaqNSfWV+hClZeejjuz4+oerrM7orq0Jw=
github.com/tursodatabase/libsql-client-go v0.0.0-20240812094001-348a4e45b535 h1:iLjJLq2A5J6L9zrhyNn+fpmxFvtEpYB4XLMr0rX3epI=
github.com/tursodatabase/libsql-client-go v0.0.0-20240812094001-348a4e45b535/go.mod h1:l8xTsYB90uaVdMHXMCxKKLSgw5wLYBwBKKefNIUnm9s=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
Expand Down
2 changes: 1 addition & 1 deletion internal/ent/hooks/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/theopenlane/core/internal/ent/generated/organization"
"github.com/theopenlane/core/internal/ent/generated/privacy"
"github.com/theopenlane/core/pkg/enums"
"github.com/theopenlane/core/pkg/passwd"
"github.com/theopenlane/utils/passwd"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/httpserve/handlers/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/theopenlane/core/pkg/enums"
"github.com/theopenlane/core/pkg/models"
"github.com/theopenlane/core/pkg/passwd"
"github.com/theopenlane/utils/passwd"
)

// LoginHandler validates the user credentials and returns a valid cookie
Expand Down
2 changes: 1 addition & 1 deletion internal/httpserve/handlers/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (h *Handler) storeAndSendEmailVerificationToken(ctx context.Context, user *
// BindRegisterHandler is used to bind the register endpoint to the OpenAPI schema
func (h *Handler) BindRegisterHandler() *openapi3.Operation {
register := openapi3.NewOperation()
register.Description = "Register creates a new user in the database with the specified password, allowing the user to login to OpenLane. This endpoint requires a 'strong' password and a valid register request, otherwise a 400 reply is returned. The password is stored in the database as an argon2 derived key so it is impossible for a hacker to get access to raw passwords. A personal organization is created for the user registering based on the organization data in the register request and the user is assigned the Owner role"
register.Description = "Register creates a new user in the database with the specified password, allowing the user to login to Openlane. This endpoint requires a 'strong' password and a valid register request, otherwise a 400 reply is returned. The password is stored in the database as an argon2 derived key so it is impossible for a hacker to get access to raw passwords. A personal organization is created for the user registering based on the organization data in the register request and the user is assigned the Owner role"
register.OperationID = "RegisterHandler"
register.Security = &openapi3.SecurityRequirements{}

Expand Down
2 changes: 1 addition & 1 deletion internal/httpserve/handlers/resetpassword.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/theopenlane/core/internal/ent/generated"
"github.com/theopenlane/core/internal/ent/privacy/token"
"github.com/theopenlane/core/pkg/models"
"github.com/theopenlane/core/pkg/passwd"
"github.com/theopenlane/utils/passwd"
)

// ResetPassword allows the user (after requesting a password reset) to
Expand Down
6 changes: 3 additions & 3 deletions internal/httpserve/server/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ func NewOpenAPISpec() (*openapi3.T, error) {
Paths: openapi3.NewPaths(),
Servers: openapi3.Servers{
&openapi3.Server{
Description: "OpenLane API Server",
Description: "Openlane API Server",
URL: "https://api.theopenlane.io/v1",
},
&openapi3.Server{
Description: "OpenLane API Server (local)",
Description: "Openlane API Server (local)",
URL: "http://localhost:17608/v1",
},
},
ExternalDocs: &openapi3.ExternalDocs{
Description: "Documentation for OpenLane's API services",
Description: "Documentation for Openlane's API services",
URL: "https://docs.theopenlane.io",
},

Expand Down
56 changes: 0 additions & 56 deletions pkg/keygen/crypto.go

This file was deleted.

136 changes: 0 additions & 136 deletions pkg/keygen/crypto_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/keygen/doc.go

This file was deleted.

59 changes: 0 additions & 59 deletions pkg/keygen/encrypt.go

This file was deleted.

Loading
Loading