Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Support for Internal OAuth2 + DPoP Feature FC-829 #119

Merged
merged 17 commits into from
Apr 2, 2024
Merged
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Go to your project's pom.xml file and add as dependency.
<dependency>
<groupId>com.liveperson.faas</groupId>
<artifactId>functions-client</artifactId>
<version>1.1.6</version>
<version>1.2.2</version>
</dependency>
```

Expand All @@ -35,10 +35,9 @@ FaasClient.Builder builder = new FaasWebClient.Builder(accountId);

Furthermore you have to choose a method of authorization.
Either you provide a client secret and client Id, as we use OAuth 2.0 with client credentials by default,
or you alternatively pass your own implementation of the `AuthSignatureBilder`.

* [More information on Client Credentials](https://developers.liveperson.com/liveperson-functions-external-invocations-client-credentials.html)
or you alternatively pass your own implementation of the `AuthSignatureBuilder` or `AuthDpopSignatureBuilder`.

* [More information on Client Credentials](https://developers.liveperson.com/liveperson-functions-foundations-external-invocation.html#authentication)

```java
String clientId = "clientId";
Expand All @@ -48,6 +47,9 @@ builder.withClientSecret(clientSecret);
or
AuthSignatureBuilder authSignatureBuilder = new YourAuthSignatureBuilder();
builder.withAuthSignatureBuilder(authSignatureBuider);
or // Oauth2 + DPoP (only for internal usage)
AuthDPoPSignatureBuilder authDPoPSignatureBuilder = new YourAuthDPoPSignatureBuilder();
builder.withAuthDPoPSignatureBuilder(authDPoPSignatureBuilder);
```

This is the bare minimum that has to be provided to build the client.
Expand All @@ -56,6 +58,10 @@ This is the bare minimum that has to be provided to build the client.
FaasClient faasClient = builder.build();
```

### DPoP authorization

The client supports Oauth2+DPoP authorization ONLY FOR INTERNAL USE in service-to-service. You must provide your implementation of the `AuthDPoPSignatureBuilder` during the initialization.

### Optional fields for builder

Additionally you can pass your own implementations of specific fields to the builder before building the client.
Expand Down Expand Up @@ -139,7 +145,7 @@ optionalParams.setRequestId("requestId");
### Fetching lambdas


**You have to use your own authentication method when fetching lambdas as it still relies on OAuth 1.0.**
**You have to use your own authentication method when fetching lambdas as it relies on OAuth 1.0. / Oauth 2.0 + DPoP**


<details><summary>Fetching lambdas of account</summary>
Expand Down
Loading
Loading