org.keycloak.services.resources

## Class Cors

- java.lang.Object
- - org.keycloak.services.resources.Cors

-     public class Cors
      extends Object

  Author:
    Stian Thorgersen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACCESS_CONTROL_ALLOW_CREDENTIALS`
    `static String` | `ACCESS_CONTROL_ALLOW_HEADERS`
    `static String` | `ACCESS_CONTROL_ALLOW_METHODS`
    `static String` | `ACCESS_CONTROL_ALLOW_ORIGIN`
    `static String` | `ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD`
    `static String` | `ACCESS_CONTROL_EXPOSE_HEADERS`
    `static String` | `ACCESS_CONTROL_MAX_AGE`
    `static String` | `AUTHORIZATION_HEADER`
    `static String` | `DEFAULT_ALLOW_HEADERS`
    `static String` | `DEFAULT_ALLOW_METHODS`
    `static long` | `DEFAULT_MAX_AGE`
    `protected static org.jboss.logging.Logger` | `logger`
    `static String` | `ORIGIN_HEADER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Cors(org.jboss.resteasy.spi.HttpRequest request)`
    `Cors(org.jboss.resteasy.spi.HttpRequest request, javax.ws.rs.core.Response.ResponseBuilder response)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Cors` | `add(org.jboss.resteasy.spi.HttpRequest request)`
    `static Cors` | `add(org.jboss.resteasy.spi.HttpRequest request, javax.ws.rs.core.Response.ResponseBuilder response)`
    `Cors` | `allowedMethods(String... allowedMethods)`
    `Cors` | `allowedOrigins(AccessToken token)`
    `Cors` | `allowedOrigins(ClientModel client)`
    `Cors` | `allowedOrigins(String... allowedOrigins)`
    `Cors` | `auth()`
    `javax.ws.rs.core.Response` | `build()`
    `void` | `build(org.jboss.resteasy.spi.HttpResponse response)`
    `Cors` | `exposedHeaders(String... exposedHeaders)`
    `Cors` | `preflight()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### DEFAULT_MAX_AGE

          public static final long DEFAULT_MAX_AGE

    - #### DEFAULT_ALLOW_METHODS

          public static final String DEFAULT_ALLOW_METHODS

      See Also:
        Constant Field Values

    - #### DEFAULT_ALLOW_HEADERS

          public static final String DEFAULT_ALLOW_HEADERS

      See Also:
        Constant Field Values

    - #### ORIGIN_HEADER

          public static final String ORIGIN_HEADER

      See Also:
        Constant Field Values

    - #### AUTHORIZATION_HEADER

          public static final String AUTHORIZATION_HEADER

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_ALLOW_ORIGIN

          public static final String ACCESS_CONTROL_ALLOW_ORIGIN

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_ALLOW_METHODS

          public static final String ACCESS_CONTROL_ALLOW_METHODS

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_ALLOW_HEADERS

          public static final String ACCESS_CONTROL_ALLOW_HEADERS

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_EXPOSE_HEADERS

          public static final String ACCESS_CONTROL_EXPOSE_HEADERS

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_ALLOW_CREDENTIALS

          public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_MAX_AGE

          public static final String ACCESS_CONTROL_MAX_AGE

      See Also:
        Constant Field Values

    - #### ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD

          public static final String ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Cors

          public Cors(org.jboss.resteasy.spi.HttpRequest request,
              javax.ws.rs.core.Response.ResponseBuilder response)

    - #### Cors

          public Cors(org.jboss.resteasy.spi.HttpRequest request)

  - ### Method Detail

    - #### add

          public static Cors add(org.jboss.resteasy.spi.HttpRequest request,
                 javax.ws.rs.core.Response.ResponseBuilder response)

    - #### add

          public static Cors add(org.jboss.resteasy.spi.HttpRequest request)

    - #### preflight

          public Cors preflight()

    - #### auth

          public Cors auth()

    - #### allowedOrigins

          public Cors allowedOrigins(ClientModel client)

    - #### allowedOrigins

          public Cors allowedOrigins(AccessToken token)

    - #### allowedOrigins

          public Cors allowedOrigins(String... allowedOrigins)

    - #### allowedMethods

          public Cors allowedMethods(String... allowedMethods)

    - #### exposedHeaders

          public Cors exposedHeaders(String... exposedHeaders)

    - #### build

          public javax.ws.rs.core.Response build()

    - #### build

          public void build(org.jboss.resteasy.spi.HttpResponse response)

Copyright © 2014. All Rights Reserved.