From 0e5e61fd14486e6b926b83895eedf9c97c2cb342 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 1 Dec 2015 14:46:17 +1300 Subject: Minor cleanup of security context class --- src/org/traccar/api/SecurityContextApi.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/org/traccar/api') diff --git a/src/org/traccar/api/SecurityContextApi.java b/src/org/traccar/api/SecurityContextApi.java index df10340c5..38ce7e33d 100644 --- a/src/org/traccar/api/SecurityContextApi.java +++ b/src/org/traccar/api/SecurityContextApi.java @@ -20,18 +20,12 @@ import javax.ws.rs.core.SecurityContext; public class SecurityContextApi implements SecurityContext { - private static final String AUTHENTICATION_SCHEME = "BASIC"; - private static final boolean IS_SECURE = true; - private Principal userPrincipal; public SecurityContextApi(Principal userPrincipal) { this.userPrincipal = userPrincipal; } - public SecurityContextApi() { - } - @Override public Principal getUserPrincipal() { return userPrincipal; @@ -45,11 +39,12 @@ public class SecurityContextApi implements SecurityContext { @Override public boolean isSecure() { - return IS_SECURE; + return false; } @Override public String getAuthenticationScheme() { - return AUTHENTICATION_SCHEME; + return BASIC_AUTH; } + } -- cgit v1.2.3