Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Victor Näslund
TOTP-Shibboleth-loginhandler
Commits
e8faf8a6
Commit
e8faf8a6
authored
Sep 12, 2016
by
Victor Näslund
Browse files
improved logic
parent
cfb18f02
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/se/smhi/totp/TOTPThrottle.java
View file @
e8faf8a6
...
...
@@ -198,24 +198,14 @@ public class TOTPThrottle {
// Look into our map and se if user should be allow to attempt to login or not
public
static
boolean
validateUsername
(
final
String
username
)
{
// Return true if username is not bruteforcing
if
(
validateMap
(
username
,
usernames
))
{
return
true
;
}
return
false
;
return
validateMap
(
username
,
usernames
);
}
// Look into our map and se if ip should be allow to attempt to login or not
public
static
boolean
validateIPAddress
(
final
String
ip
)
{
// Return true if ip is not bruteforcing
if
(
validateMap
(
ip
,
IPAddresses
))
{
return
true
;
}
return
false
;
return
validateMap
(
ip
,
IPAddresses
);
}
// User passed a loginattempt so we clear the user from our maps
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment