Skip to content

Commit

Permalink
Merge pull request #37 from croessner/features
Browse files Browse the repository at this point in the history
Refactor auth request processing and TOTP secret retrieval
  • Loading branch information
croessner authored May 28, 2024
2 parents 85be48e + cfa5af1 commit 158f4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions server/core/hydra.go
Original file line number Diff line number Diff line change
Expand Up @@ -1157,10 +1157,8 @@ func initializeAuthLogin(ctx *gin.Context) (*Authentication, error) {

auth.withDefaults(ctx).withClientInfo(ctx).withLocalInfo(ctx).withUserAgent(ctx).withXSSL(ctx)

if found, reject := auth.preproccessAuthRequest(ctx); reject {
if _, reject := auth.preproccessAuthRequest(ctx); reject {
return nil, errors2.ErrBruteForceAttack
} else if found {
auth.withClientInfo(ctx).withLocalInfo(ctx).withUserAgent(ctx).withXSSL(ctx)
}

return auth, nil
Expand Down
2 changes: 1 addition & 1 deletion server/core/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func saveMasterUserTOTPSecret(masterUserMode bool, ldapReply *backend.LDAPReply,
if masterUserMode {
// Check if the master user does have a TOTP secret.
if value, okay := ldapReply.Result[totpSecretField]; okay {
totpSecretPre = value
return value
}
}

Expand Down

0 comments on commit 158f4c9

Please sign in to comment.