io.swagger.annotations.Authorization.scopes()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中io.swagger.annotations.Authorization.scopes()方法的一些代码示例,展示了Authorization.scopes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authorization.scopes()方法的具体详情如下:
包路径:io.swagger.annotations.Authorization
类名称:Authorization
方法名:scopes

Authorization.scopes介绍

暂无

代码示例

代码示例来源:origin: kongchen/swagger-maven-plugin

protected List<SecurityRequirement> getSecurityRequirements(Api api) {
  List<SecurityRequirement> securities = new ArrayList<>();
  if(api == null) {
    return securities;
  }
  for (Authorization auth : api.authorizations()) {
    if (auth.value().isEmpty()) {
      continue;
    }
    SecurityRequirement security = new SecurityRequirement();
    security.setName(auth.value());
    for (AuthorizationScope scope : auth.scopes()) {
      if (!scope.scope().isEmpty()) {
        security.addScope(scope.scope());
      }
    }
    securities.add(security);
  }
  return securities;
}

代码示例来源:origin: kongchen/swagger-maven-plugin

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (!scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: kongchen/swagger-maven-plugin

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (!scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: yangfuhai/jboot

private static List<SecurityRequirement> parseAuthorizations(Authorization[] authorizations) {
  final List<SecurityRequirement> result = new ArrayList<SecurityRequirement>();
  for (Authorization auth : authorizations) {
    if (StringUtils.isNotEmpty(auth.value())) {
      final SecurityRequirement security = new SecurityRequirement();
      security.setName(auth.value());
      for (AuthorizationScope scope : auth.scopes()) {
        if (StringUtils.isNotEmpty(scope.scope())) {
          security.addScope(scope.scope());
        }
      }
      result.add(security);
    }
  }
  return result;
}

代码示例来源:origin: io.springfox/springfox-swagger-common

for (Authorization authorization : authorizationReferences(apiOperationAnnotation.get())) {
 String value = authorization.value();
 AuthorizationScope[] scopes = authorization.scopes();
 List<springfox.documentation.service.AuthorizationScope> authorizationScopeList = newArrayList();
 for (AuthorizationScope authorizationScope : scopes) {

代码示例来源:origin: noboomu/proteus

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (scope.scope() != null && !scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: wso2/msf4j

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
AuthorizationScope[] scopes = auth.scopes();
for (AuthorizationScope scope : scopes) {
  if (scope.scope() != null && !"".equals(scope.scope())) {

代码示例来源:origin: org.wso2.msf4j/msf4j-swagger

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
AuthorizationScope[] scopes = auth.scopes();
for (AuthorizationScope scope : scopes) {
  if (scope.scope() != null && !"".equals(scope.scope())) {

代码示例来源:origin: io.swagger/swagger-jaxrs

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (scope.scope() != null && !scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: noboomu/proteus

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (!scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: wso2/msf4j

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
AuthorizationScope[] scopes = auth.scopes();
for (AuthorizationScope scope : scopes) {
  if (scope.scope() != null && !"".equals(scope.scope())) {

代码示例来源:origin: javagossip/dorado

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (scope.scope() != null && !scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: org.wso2.msf4j/msf4j-swagger

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
AuthorizationScope[] scopes = auth.scopes();
for (AuthorizationScope scope : scopes) {
  if (scope.scope() != null && !"".equals(scope.scope())) {

代码示例来源:origin: io.swagger/swagger-jaxrs

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (!scope.scope().isEmpty()) {
    security.addScope(scope.scope());

代码示例来源:origin: javagossip/dorado

SecurityRequirement security = new SecurityRequirement();
security.setName(auth.value());
for (AuthorizationScope scope : auth.scopes()) {
  if (!scope.scope().isEmpty()) {
    security.addScope(scope.scope());

相关文章