batazor/go-auth

View on GitHub

Showing 99 of 99 total issues

exported type Captcha should have comment or be unexported
Open

type Captcha struct {
Severity: Minor
Found in utils/recaptcha/types.go by golint

exported var RECAPTCHA_PRIVATE_KEY should have comment or be unexported
Open

    RECAPTCHA_PRIVATE_KEY string
Severity: Minor
Found in utils/recaptcha/recaptcha.go by golint

Your code does not pass gofmt in 1 place. Go fmt your code!
Open

package user
Severity: Minor
Found in handlers/user/user_test.go by gofmt

don't use MixedCaps in package name; sessionModel should be sessionmodel
Open

package sessionModel
Severity: Minor
Found in models/session/session.go by golint

don't use ALL_CAPS in Go names; use CamelCase
Open

    PUBLIC_KEY  = "cert/public_key.pub"
Severity: Minor
Found in models/session/session.go by golint

exported type Profile should have comment or be unexported
Open

type Profile struct {
Severity: Minor
Found in models/user/types.go by golint

func parameter userId should be userID
Open

func Delete(userId string) (int64, error) {
Severity: Minor
Found in models/user/user.go by golint

type name will be used as recaptcha.RecaptchaResponse by other packages, and that stutters; consider calling this Response
Open

type RecaptchaResponse struct {
Severity: Minor
Found in utils/recaptcha/types.go by golint

2: cannot find package "github.com/go-chi/chi" in any of:
Open

    "github.com/go-chi/chi"
Severity: Minor
Found in cmd/go-auth/main.go by govet

exported type Callback should have comment or be unexported
Open

type Callback struct {
Severity: Minor
Found in handlers/oauth/types.go by golint

exported function CreateJWTToken should have comment or be unexported
Open

func CreateJWTToken() (string, string, error) {
Severity: Minor
Found in handlers/session/jwt.go by golint

exported function Logout should have comment or be unexported
Open

func Logout(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/session/session.go by golint

var userId should be userID
Open

    userId, _ := sessionModel.GetValueByKey(user.RecoveryToken)
Severity: Minor
Found in handlers/session/session.go by golint

don't use ALL_CAPS in Go names; use CamelCase
Open

        ENABLE_CAPTCHA := utils.Getenv("ENABLE_CAPTCHA", "false")
Severity: Minor
Found in middleware/captcha.go by golint

struct field Id should be ID
Open

    Id      string `json:"id"`
Severity: Minor
Found in models/user/types.go by golint

exported function Delete should have comment or be unexported
Open

func Delete(userId string) (int64, error) {
Severity: Minor
Found in models/user/user.go by golint

comment on exported var ClientID should be of the form "ClientID ..."
Open

    // Get configuration
Severity: Minor
Found in handlers/oauth/google.go by golint

exported function NewRecoveryLink should have comment or be unexported
Open

func NewRecoveryLink(value string) (string, error) {
Severity: Minor
Found in models/session/session.go by golint

exported type RecaptchaResponse should have comment or be unexported
Open

type RecaptchaResponse struct {
Severity: Minor
Found in utils/recaptcha/types.go by golint

Trailing spaces
Open

`initialState/user.json` - contains initial information 
Severity: Info
Found in README.md by markdownlint

MD009 - Trailing spaces

Tags: whitespace

Aliases: no-trailing-spaces

Parameters: br_spaces (number; default: 0)

This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

Severity
Category
Status
Source
Language