Java Code Examples for springfox.documentation.swagger.web.ApiKeyVehicle#HEADER
The following examples show how to use
springfox.documentation.swagger.web.ApiKeyVehicle#HEADER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwaggerController.java From open-cloud with MIT License | 5 votes |
/** * swagger安全配置 * * @param commonProperties * @return */ @Bean public SecurityConfiguration security(OpenCommonProperties commonProperties) { return new SecurityConfiguration(commonProperties.getClientId(), commonProperties.getClientSecret(), "realm", commonProperties.getClientId(), "", ApiKeyVehicle.HEADER, "", ","); }
Example 2
Source File: SwaggerAutoConfiguration.java From open-cloud with MIT License | 5 votes |
@Bean public SecurityConfiguration security() { return new SecurityConfiguration(openSwaggerProperties.getClientId(), openSwaggerProperties.getClientSecret(), "realm", openSwaggerProperties.getClientId(), "", ApiKeyVehicle.HEADER, "", ","); }
Example 3
Source File: SwaggerConfig.java From pacbot with Apache License 2.0 | 5 votes |
@Bean public SecurityConfiguration securityInfo() { String hostName = configUrl.split("/api")[0]; if (dataSource.equalsIgnoreCase("azuread")) { return new SecurityConfiguration( clientId, StringUtils.EMPTY, hostName, clientId, BEARER, ApiKeyVehicle.HEADER, AUTHORIZATION, StringUtils.EMPTY ); } else { return new SecurityConfiguration( null, null, hostName, null, null, ApiKeyVehicle.HEADER, AUTHORIZATION, null ); } }
Example 4
Source File: AuthSwaggerConfig.java From pacbot with Apache License 2.0 | 5 votes |
@Bean public SecurityConfiguration securityInfo() { String hostName; if(applicationName.equalsIgnoreCase(AUTH_SERVICE)) { String url = System.getenv(DOMAIN_URL); hostName = url.split(API)[0]; } else { hostName = configUrl.split(API)[0]; } if (dataSource.equalsIgnoreCase(AZURE_READ)) { return new SecurityConfiguration( clientId, StringUtils.EMPTY, hostName, clientId, BEARER, ApiKeyVehicle.HEADER, AUTHORIZATION, StringUtils.EMPTY ); } else { return new SecurityConfiguration( null, null, hostName, null, null, ApiKeyVehicle.HEADER, AUTHORIZATION, null ); } }
Example 5
Source File: SwaggerConfig.java From Software-Architecture-with-Spring-5.0 with MIT License | 5 votes |
@Bean SecurityConfiguration security() { return new SecurityConfiguration( null, null, null, null, "PUT_HERE_YOUR_JWT", ApiKeyVehicle.HEADER, "x-auth-token", "," /*scope separator*/); }
Example 6
Source File: SwaggerAutoConfiguration.java From mcloud with Apache License 2.0 | 5 votes |
@Bean SecurityConfiguration security() { return new SecurityConfiguration(null, null, null, null, "", ApiKeyVehicle.HEADER, "Authorization", null); }
Example 7
Source File: OAuthServerConfiguration.java From microservices-basics-spring-boot with Apache License 2.0 | 5 votes |
@Bean SecurityConfiguration security() { return new SecurityConfiguration(null, null, null, // realm Needed for authenticate button to work null, // appName Needed for authenticate button to work "BEARER ", // apiKeyValue ApiKeyVehicle.HEADER, AUTHORIZATION_HEADER, // apiKeyName null); }
Example 8
Source File: SwaggerConfig.java From ponto-inteligente-api with MIT License | 5 votes |
@Bean public SecurityConfiguration security() { String token; try { UserDetails userDetails = this.userDetailsService.loadUserByUsername("[email protected]"); token = this.jwtTokenUtil.obterToken(userDetails); } catch (Exception e) { token = ""; } return new SecurityConfiguration(null, null, null, null, "Bearer " + token, ApiKeyVehicle.HEADER, "Authorization", ","); }
Example 9
Source File: SwaggerConfig.java From spring-boot-react-blog with Apache License 2.0 | 4 votes |
@Bean public SecurityConfiguration security() { return new SecurityConfiguration(null, null, null, null, "Bearer " + jwtUtil.createAdminToken(), ApiKeyVehicle.HEADER, "Authorization", "," /* scope separator */); }
Example 10
Source File: MainController.java From steady with Apache License 2.0 | 4 votes |
@Bean SecurityConfiguration security() { return new SecurityConfiguration("abc", "123", "pets", "petstore", Constants.HTTP_TENANT_HEADER, ApiKeyVehicle.HEADER, "", ","); }
Example 11
Source File: SwaggerConfig.java From springfox-oath2-demo with Apache License 2.0 | 4 votes |
@Bean public SecurityConfiguration securityInfo() { return new SecurityConfiguration(clientId, clientSecret, "realm", clientId, "apiKey", ApiKeyVehicle.HEADER, "api_key", ""); }
Example 12
Source File: Application.java From springfox-demos with Apache License 2.0 | 4 votes |
@Bean public SecurityConfiguration securityInfo() { return new SecurityConfiguration("abc", "123", "pets", "petstore", "123", ApiKeyVehicle.HEADER, "", ","); }
Example 13
Source File: MainController.java From steady with Apache License 2.0 | 2 votes |
/** * <p>securityInfo.</p> * * @return a {@link springfox.documentation.swagger.web.SecurityConfiguration} object. */ @Bean public SecurityConfiguration securityInfo() { return new SecurityConfiguration("abc", "123", "pets", "petstore", Constants.HTTP_TENANT_HEADER, ApiKeyVehicle.HEADER, "", ","); }