本文整理汇总了Java中springfox.documentation.service.ApiKey类的典型用法代码示例。如果您正苦于以下问题:Java ApiKey类的具体用法?Java ApiKey怎么用?Java ApiKey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApiKey类属于springfox.documentation.service包,在下文中一共展示了ApiKey类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: api
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)//
.select()//
.apis(RequestHandlerSelectors.any())//
.paths(Predicates.not(PathSelectors.regex("/error")))//
.build()//
.apiInfo(metadata())//
.useDefaultResponseMessages(false)//
.securitySchemes(new ArrayList<>(Arrays.asList(new ApiKey("Bearer %token", "Authorization", "Header"))))//
.tags(new Tag("users", "Operations about users"))//
.tags(new Tag("ping", "Just a ping"))//
.genericModelSubstitutes(Optional.class);
}
示例2: jwtTokenKey
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
private ApiKey jwtTokenKey() {
return new ApiKey("X-Authorization", "JWT token", "header");
}
示例3: apiKeys
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
private List<SecurityScheme> apiKeys() {
return Collections.singletonList(new ApiKey("Authorization", "Authorization", "header"));
}
示例4: apiKey
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
private ApiKey apiKey() {
return new ApiKey("x-auth-token", "x-auth-token", "header");
}
示例5: apiKey
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
private ApiKey apiKey() {
return new ApiKey("mykey", "api_key", "header");
}
示例6: apiKey
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
private ApiKey apiKey() {
return new ApiKey("mykey", "api_key", "header");
}
示例7: apiKey
import springfox.documentation.service.ApiKey; //导入依赖的package包/类
@Bean
SecurityScheme apiKey() {
return new ApiKey("api_key", "api_key", "header");
}