Skip to content

Commit bcafeb0

Browse files
authored
Merge pull request #48 from cloudsufi/cherry-pick-6e7d1512fbf6b2a0805dfa5923db9aa974efea37
[🍒][PLUGIN-1741] SuccessFactors - OAuth2 Implementation
2 parents 0c575e5 + 02b6cbe commit bcafeb0

23 files changed

+1318
-165
lines changed

docs/SuccessFactors-batchsource.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,22 @@ annotating metadata, etc.
1919
**Use Connection:** Whether to use a connection. If a connection is used, you do not need to provide the credentials.
2020
**Connection:** Name of the connection to use. Entity Names information will be provided by the connection.
2121
You also can use the macro function ${conn(connection-name)}.
22+
**Authentication Type:** Authentication type used to submit request. Supported types are Basic & OAuth 2.0. Default is Basic Authentication.
23+
* **Basic Authentication**
2224
**SAP SuccessFactors Logon Username (M)**: SAP SuccessFactors Logon Username for user authentication.
2325
**SAP SuccessFactors Logon Password (M)**: SAP SuccessFactors Logon password for user authentication.
26+
* **OAuth 2.0**
27+
**Client ID:** Client ID (API Key) required to generate the token.
28+
**Company ID:** Company ID required to generate the token.
29+
**Token URL:** Token URL to generate the assertion token.
30+
**Assertion Token Type:** Assertion token can be entered or can be created using the required parameters.
31+
* **Enter Token**
32+
**Assertion Token:** Assertion token used to generate the access token.
33+
* **Create Token**
34+
**Private Key:** Private key required to generate the token.
35+
**Expire Assertion Token In (Minutes):** Assertion Token will not be valid after the specified time. Default 1440 minutes (24 hours).
36+
**User ID:** User ID required to generate the token.
37+
2438
**SAP SuccessFactors Base URL (M)**: SAP SuccessFactors Base URL.
2539

2640
## Proxy Configuration

docs/SuccessFactors-connector.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,21 @@ Properties
1010

1111
**Description:** Description of the connection.
1212

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

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

pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<junit.version>4.12</junit.version>
4242
<gcs.client.version>2.0.0</gcs.client.version>
4343
<okhttp3.version>4.9.1</okhttp3.version>
44+
<httpclient.version>4.5.14</httpclient.version>
4445
<apache.olingo.v2>2.0.0</apache.olingo.v2>
4546
<wiremock.version>2.27.2</wiremock.version>
4647
<hydrator.version>2.7.0</hydrator.version>
@@ -339,7 +340,16 @@
339340
<artifactId>okhttp</artifactId>
340341
<version>${okhttp3.version}</version>
341342
</dependency>
342-
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
343+
<dependency>
344+
<groupId>org.apache.httpcomponents</groupId>
345+
<artifactId>httpclient</artifactId>
346+
<version>${httpclient.version}</version>
347+
</dependency>
348+
<dependency>
349+
<groupId>org.opensaml</groupId>
350+
<artifactId>opensaml</artifactId>
351+
<version>2.6.4</version>
352+
</dependency>
343353
<dependency>
344354
<groupId>com.fasterxml.jackson.core</groupId>
345355
<artifactId>jackson-databind</artifactId>

src/main/java/io/cdap/plugin/successfactors/common/util/ResourceConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
public enum ResourceConstants {
2424

2525
ERR_MISSING_PARAM_PREFIX(null, "err.missing.param.prefix"),
26+
ERR_INVALID_EXPIRE_TIME(null, "err.invalid.expire.time.prefix"),
2627
ERR_MISSING_PARAM_OR_MACRO_ACTION(null, "err.missing.param.or.macro.action"),
2728
ERR_INVALID_BASE_URL(null, "err.invalid.base.url"),
2829
ERR_FEATURE_NOT_SUPPORTED("CDF_SAP_ODATA_01500", "err.feature.not.supported"),

0 commit comments

Comments
 (0)