Tabnine Logo
DefaultSecurityContext.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.englishtown.vertx.jersey.security.DefaultSecurityContext
constructor

Best Java code snippets using com.englishtown.vertx.jersey.security.DefaultSecurityContext.<init> (Showing top 5 results out of 315)

origin: com.englishtown/vertx-mod-jersey

protected void handle(
    final HttpServerRequest vertxRequest,
    final InputStream inputStream
) {
  URI uri = getAbsoluteURI(vertxRequest);
  boolean isSecure = "https".equalsIgnoreCase(uri.getScheme());
  UriBuilder baseUriBuilder = UriBuilder.fromUri(uri)
      .replacePath(baseUri.getPath())
      .replaceQuery(null);
  // Create the jersey request
  final ContainerRequest jerseyRequest = new ContainerRequest(
      baseUriBuilder.build(),
      uri,
      vertxRequest.method(),
      new DefaultSecurityContext(isSecure),
      new MapPropertiesDelegate());
  handle(vertxRequest, inputStream, jerseyRequest);
}
origin: ef-labs/vertx-jersey

protected void handle(
    final HttpServerRequest vertxRequest,
    final InputStream inputStream
) {
  URI uri = getAbsoluteURI(vertxRequest);
  boolean isSecure = "https".equalsIgnoreCase(uri.getScheme());
  UriBuilder baseUriBuilder = UriBuilder.fromUri(uri)
      .replacePath(getBaseUri().getPath())
      .replaceQuery(null);
  // Create the jersey request
  final ContainerRequest jerseyRequest = new ContainerRequest(
      baseUriBuilder.build(),
      uri,
      vertxRequest.method().name(),
      new DefaultSecurityContext(isSecure),
      new MapPropertiesDelegate());
  handle(vertxRequest, inputStream, jerseyRequest);
}
origin: com.englishtown.vertx/vertx-jersey

protected void handle(
    final HttpServerRequest vertxRequest,
    final InputStream inputStream
) {
  URI uri = getAbsoluteURI(vertxRequest);
  boolean isSecure = "https".equalsIgnoreCase(uri.getScheme());
  UriBuilder baseUriBuilder = UriBuilder.fromUri(uri)
      .replacePath(getBaseUri().getPath())
      .replaceQuery(null);
  // Create the jersey request
  final ContainerRequest jerseyRequest = new ContainerRequest(
      baseUriBuilder.build(),
      uri,
      vertxRequest.method().name(),
      new DefaultSecurityContext(isSecure),
      new MapPropertiesDelegate());
  handle(vertxRequest, inputStream, jerseyRequest);
}
origin: ef-labs/vertx-jersey

@Test
public void testGetSecurityContext() throws Exception {
  boolean isSecure = false;
  DefaultSecurityContext securityContext = new DefaultSecurityContext(isSecure);
  assertNull(securityContext.getUserPrincipal());
  assertFalse(securityContext.isUserInRole("1"));
  assertFalse(securityContext.isSecure());
  assertNull(securityContext.getAuthenticationScheme());
}
origin: ef-labs/vertx-jersey

  @Test
  public void testGetSecurityContext_Secure() throws Exception {

    boolean isSecure = true;
    DefaultSecurityContext securityContext = new DefaultSecurityContext(isSecure);

    assertNull(securityContext.getUserPrincipal());
    assertFalse(securityContext.isUserInRole("1"));
    assertTrue(securityContext.isSecure());
    assertNull(securityContext.getAuthenticationScheme());

  }
}
com.englishtown.vertx.jersey.securityDefaultSecurityContext<init>

Popular methods of DefaultSecurityContext

  • getAuthenticationScheme
    Returns the string value of the authentication scheme used to protect the resource. If the resource
  • getUserPrincipal
    Returns a java.security.Principal object containing the name of the current authenticated user. If t
  • isSecure
    Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
  • isUserInRole
    Returns a boolean indicating whether the authenticated user is included in the specified logical "ro

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now