diff app/src/main/java/net/sourceforge/jsocks/server/UserValidation.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/net/sourceforge/jsocks/server/UserValidation.java@72de889ecfe7
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/src/main/java/net/sourceforge/jsocks/server/UserValidation.java	Thu Dec 03 11:23:55 2015 -0800
@@ -0,0 +1,21 @@
+package net.sourceforge.jsocks.server;
+
+/**
+  Interface which provides for user validation, based on user name
+  password and where it connects from.
+*/
+public interface UserValidation{
+    /**
+     Implementations of this interface are expected to use some or all
+     of the information provided plus any information they can extract
+     from other sources to decide wether given user should be allowed
+     access to SOCKS server, or whatever you use it for.
+
+     @return true to indicate user is valid, false otherwise.
+     @param username User whom implementation should validate.
+     @param password Password this user provided.
+     @param connection Socket which user used to connect to the server.
+    */
+    boolean isUserValid(String username,String password,
+                        java.net.Socket connection);
+}