Skip to content

Commit

Permalink
Add FR OAuth2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
psainics committed Jan 8, 2025
1 parent 599f481 commit a7772ea
Show file tree
Hide file tree
Showing 24 changed files with 1,324 additions and 177 deletions.
14 changes: 14 additions & 0 deletions docs/SuccessFactors-batchsource.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,22 @@ annotating metadata, etc.
**Use Connection:** Whether to use a connection. If a connection is used, you do not need to provide the credentials.
**Connection:** Name of the connection to use. Entity Names information will be provided by the connection.
You also can use the macro function ${conn(connection-name)}.
**Authentication Type:** Authentication type used to submit request. Supported types are Basic & OAuth 2.0. Default is Basic Authentication.
* **Basic Authentication**
**SAP SuccessFactors Logon Username (M)**: SAP SuccessFactors Logon Username for user authentication.
**SAP SuccessFactors Logon Password (M)**: SAP SuccessFactors Logon password for user authentication.
* **OAuth 2.0**
**Client ID:** Client ID (API Key) required to generate the token.
**Company ID:** Company ID required to generate the token.
**Token URL:** Token URL to generate the assertion token.
**Assertion Token Type:** Assertion token can be entered or can be created using the required parameters.
* **Enter Token**
**Assertion Token:** Assertion token used to generate the access token.
* **Create Token**
**Private Key:** Private key required to generate the token.
**Expire Assertion Token In (Minutes):** Assertion Token will not be valid after the specified time. Default 1440 minutes (24 hours).
**User ID:** User ID required to generate the token.

**SAP SuccessFactors Base URL (M)**: SAP SuccessFactors Base URL.

## Proxy Configuration
Expand Down
18 changes: 15 additions & 3 deletions docs/SuccessFactors-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ Properties

**Description:** Description of the connection.

**SAP SuccessFactors Logon Username (M)**: SAP SuccessFactors Logon Username for user authentication.

**SAP SuccessFactors Logon Password (M)**: SAP SuccessFactors Logon password for user authentication.
**Authentication Type:** Authentication type used to submit request. Supported types are Basic & OAuth 2.0. Default is Basic Authentication.
* **Basic Authentication**
**SAP SuccessFactors Logon Username (M)**: SAP SuccessFactors Logon Username for user authentication.
**SAP SuccessFactors Logon Password (M)**: SAP SuccessFactors Logon password for user authentication.
* **OAuth 2.0**
**Client ID:** Client ID (API Key) required to generate the token.
**Company ID:** Company ID required to generate the token.
**Token URL:** Token URL to generate the assertion token.
**Assertion Token Type:** Assertion token can be entered or can be created using the required parameters.
* **Enter Token**
**Assertion Token:** Assertion token used to generate the access token.
* **Create Token**
**Private Key:** Private key required to generate the token.
**Expire Assertion Token In (Minutes):** Assertion Token will not be valid after the specified time. Default 1440 minutes (24 hours).
**User ID:** User ID required to generate the token.

**SAP SuccessFactors Base URL (M)**: SAP SuccessFactors Base URL.

Expand Down
24 changes: 14 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<junit.version>4.12</junit.version>
<gcs.client.version>2.0.0</gcs.client.version>
<okhttp3.version>4.9.1</okhttp3.version>
<httpclient.version>4.5.14</httpclient.version>
<apache.olingo.v2>2.0.0</apache.olingo.v2>
<wiremock.version>2.27.2</wiremock.version>
<hydrator.version>2.7.0</hydrator.version>
Expand Down Expand Up @@ -339,7 +340,16 @@
<artifactId>okhttp</artifactId>
<version>${okhttp3.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -607,15 +617,9 @@
<include>TestRunner.java</include>
</includes>
<environmentVariables>
<SUCCESSFACTORS_USERNAME>
${SUCCESSFACTORS_USERNAME}
</SUCCESSFACTORS_USERNAME>
<SUCCESSFACTORS_PASSWORD>
${SUCCESSFACTORS_PASSWORD}
</SUCCESSFACTORS_PASSWORD>
<SUCCESSFACTORS_BASEURL>
${SUCCESSFACTORS_BASEURL}
</SUCCESSFACTORS_BASEURL>
<SUCCESSFACTORS_USERNAME>superadmin@SFCPART002131</SUCCESSFACTORS_USERNAME>
<SUCCESSFACTORS_PASSWORD>Cloudsufi@20</SUCCESSFACTORS_PASSWORD>
<SUCCESSFACTORS_BASEURL>https://api68sales.successfactors.com/odata/v2</SUCCESSFACTORS_BASEURL>
</environmentVariables>
</configuration>
<executions>
Expand Down
6 changes: 3 additions & 3 deletions src/e2e-test/resources/pluginParameters.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Authentication properties

admin.baseurl = SUCCESSFACTORS_BASEURL
admin.username = SUCCESSFACTORS_USERNAME
admin.password = SUCCESSFACTORS_PASSWORD
admin.baseurl = https://api68sales.successfactors.com/odata/v2
admin.username = superadmin@SFCPART002131
admin.password = Cloudsufi@20

valid.entityname = EmpCostDistribution
paginationtype.server = serverSide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
public enum ResourceConstants {

ERR_MISSING_PARAM_PREFIX(null, "err.missing.param.prefix"),
ERR_INVALID_EXPIRE_TIME(null, "err.invalid.expire.time.prefix"),
ERR_MISSING_PARAM_OR_MACRO_ACTION(null, "err.missing.param.or.macro.action"),
ERR_INVALID_BASE_URL(null, "err.invalid.base.url"),
ERR_FEATURE_NOT_SUPPORTED("CDF_SAP_ODATA_01500", "err.feature.not.supported"),
Expand Down
Loading

0 comments on commit a7772ea

Please sign in to comment.