devrelcollective/xela

View on GitHub
actions/auth.go

Summary

Maintainability
A
45 mins
Test Coverage

Function AuthCallback has 7 return statements (exceeds 4 allowed).
Open

func AuthCallback(c buffalo.Context) error {
    gu, err := gothic.CompleteUserAuth(c.Response(), c.Request())
    if err != nil {
        return c.Error(401, err)
    }
Severity: Major
Found in actions/auth.go - About 45 mins to fix

    exported function AuthCallback should have comment or be unexported
    Open

    func AuthCallback(c buffalo.Context) error {
    Severity: Minor
    Found in actions/auth.go by golint

    exported function SetCurrentUser should have comment or be unexported
    Open

    func SetCurrentUser(next buffalo.Handler) buffalo.Handler {
    Severity: Minor
    Found in actions/auth.go by golint

    exported function Authorize should have comment or be unexported
    Open

    func Authorize(next buffalo.Handler) buffalo.Handler {
    Severity: Minor
    Found in actions/auth.go by golint

    exported function IsAuthorizedDomain should have comment or be unexported
    Open

    func IsAuthorizedDomain(userDomain string) bool {
    Severity: Minor
    Found in actions/auth.go by golint

    exported function AuthDestroy should have comment or be unexported
    Open

    func AuthDestroy(c buffalo.Context) error {
    Severity: Minor
    Found in actions/auth.go by golint

    There are no issues that match your filters.

    Category
    Status