Interface OAuthSecurity

All Known Implementing Classes:
OAuthSecurityImpl

public interface OAuthSecurity
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setSystemTokenOnClient(org.apache.cxf.jaxrs.client.Client client, String clientId, String clientSecret, String discoveryUrl)
    Gets the system's access token from the token storage to set it to the OAUTH header.
    void
    setUserTokenOnClient(org.apache.cxf.jaxrs.client.Client client, ddf.security.Subject subject, String sourceId)
    Gets the user's access token from the token storage to set it to the OAUTH header.
    void
    setUserTokenOnClient(org.apache.cxf.jaxrs.client.Client client, String sourceId, String clientId, String clientSecret, String username, String password, String discoveryUrl, Map<String,String> additionalParameters)
    Gets the user's access token from the token storage to set it to the OAUTH header.
  • Field Details

  • Method Details

    • setUserTokenOnClient

      void setUserTokenOnClient(org.apache.cxf.jaxrs.client.Client client, ddf.security.Subject subject, String sourceId)
      Gets the user's access token from the token storage to set it to the OAUTH header. Used when a source is configured to use Authentication Code flow/grant.
      Parameters:
      client - Non-null client to set the access token on.
      subject - subject used to get the session ID
      sourceId - the id of the source using OAuth needed to get the correct tokens
    • setUserTokenOnClient

      void setUserTokenOnClient(org.apache.cxf.jaxrs.client.Client client, String sourceId, String clientId, String clientSecret, String username, String password, String discoveryUrl, Map<String,String> additionalParameters)
      Gets the user's access token from the token storage to set it to the OAUTH header. If one is not available, make a call to the OAuth provider to get tokens. Used when a source is configured to use Resource Owner Password Credentials flow/grant.
      Parameters:
      client - Non-null client to set the access token on.
      sourceId - The ID of the source using OAuth needed to get the correct tokens
      clientId - The client ID registered with the OAuth provider
      clientSecret - The client secret registered with the OAuth provider
      username - The user's username
      password - The user's password
      discoveryUrl - The metadata URL of the OAuth provider
      additionalParameters - Additional queryParameters to send to the OAuth provider
    • setSystemTokenOnClient

      void setSystemTokenOnClient(org.apache.cxf.jaxrs.client.Client client, String clientId, String clientSecret, String discoveryUrl)
      Gets the system's access token from the token storage to set it to the OAUTH header. If one can not be found, retrieves the system's access token from the configured OAuth provider. Used when a source is configured to use Client Credentials flow/grant.
      Parameters:
      client - Non-null client to set the access token on.
      clientId - The client ID registered with the OAuth provider
      clientSecret - The client secret registered with the OAuth provider
      discoveryUrl - the metadata URL of the OAuth provider