com.descope.proxy.impl.ApiProxyImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
Java library used to integrate with Descope.
The newest version!
package com.descope.proxy.impl;
import com.descope.model.client.SdkInfo;
import com.descope.proxy.ApiProxy;
import com.fasterxml.jackson.core.type.TypeReference;
import java.net.URI;
import java.util.function.Supplier;
class ApiProxyImpl extends AbstractProxyImpl implements ApiProxy {
public ApiProxyImpl(SdkInfo sdkInfo) {
setSdkInfo(sdkInfo);
}
public ApiProxyImpl(Supplier authHeaderSupplier, SdkInfo sdkInfo) {
setAuthHeader("Authorization", authHeaderSupplier);
setSdkInfo(sdkInfo);
}
@Override
public R post(URI uri, B body, Class returnClz) {
return super.post(uri, body, returnClz);
}
@Override
public R patch(URI uri, B body, Class returnClz) {
return super.patch(uri, body, returnClz);
}
@Override
public R postAndGetArray(URI uri, B body, TypeReference typeReference) {
return super.post(uri, body, typeReference);
}
@Override
public R get(URI uri, Class returnClz) {
return super.get(uri, returnClz);
}
@Override
public R getArray(URI uri, TypeReference typeReference) {
return super.get(uri, typeReference);
}
@Override
public R delete(URI uri, B body, Class returnClz) {
return super.delete(uri, body, returnClz);
}
}