All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.security.oauth2.provider.BaseClientDetails Maven / Gradle / Ivy

The newest version!
package org.springframework.security.oauth2.provider;

import org.springframework.security.core.GrantedAuthority;

import java.util.Collections;
import java.util.List;

/**
 * Base POJO-based implementation of {@link org.springframework.security.oauth2.provider.ClientDetails}.
 *
 * @author Ryan Heaton
 */
public class BaseClientDetails implements ClientDetails {

  private String clientId;
  private String clientSecret;
  private List scope;
  private List authorizedFlows;
  private String webServerRedirectUri;
  private List authorities = Collections.emptyList();

  public String getClientId() {
    return clientId;
  }

  public void setClientId(String clientId) {
    this.clientId = clientId;
  }

  public boolean isSecretRequired() {
    return this.clientSecret != null;
  }

  public String getClientSecret() {
    return clientSecret;
  }

  public void setClientSecret(String clientSecret) {
    this.clientSecret = clientSecret;
  }

  public boolean isScoped() {
    return this.scope != null && !this.scope.isEmpty();
  }

  public List getScope() {
    return scope;
  }

  public void setScope(List scope) {
    this.scope = scope;
  }

  public List getAuthorizedFlows() {
    return authorizedFlows;
  }

  public void setAuthorizedFlows(List authorizedFlows) {
    this.authorizedFlows = authorizedFlows;
  }

  public String getWebServerRedirectUri() {
    return webServerRedirectUri;
  }

  public void setWebServerRedirectUri(String webServerRedirectUri) {
    this.webServerRedirectUri = webServerRedirectUri;
  }

  public List getAuthorities() {
    return authorities;
  }

  public void setAuthorities(List authorities) {
    this.authorities = authorities;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy