Skip to content

API fixes #828

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

Merged
merged 6 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions msal4j-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,33 @@
<build>
<sourceDirectory>${project.build.directory}/delombok</sourceDirectory>
<plugins>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.15.0</version>
<configuration>
<analysisConfiguration>
<revapi.java>
<checks>
<failBuildOnProblemsFound>false</failBuildOnProblemsFound>
</checks>
</revapi.java>
</analysisConfiguration>
</configuration>
<dependencies>
<dependency>
<groupId>org.revapi</groupId>
<artifactId>revapi-java</artifactId>
<version>0.28.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>check</id>
<goals><goal>check</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,100 @@ public T instanceDiscovery(boolean val) {
return self();
}

/**
* Set logPii - boolean value, which determines
* whether Pii (personally identifiable information) will be logged in.
* The default value is false.
*
* @param val a boolean value for logPii
* @return instance of the Builder on which method was called
*/
public T logPii(boolean val) {
return super.logPii(val);
}

/**
* Sets the connect timeout value used in HttpsURLConnection connections made by {@link DefaultHttpClient},
* and is not needed if using a custom HTTP client
*
* @param val timeout value in milliseconds
* @return instance of the Builder on which method was called
*/
public T connectTimeoutForDefaultHttpClient(Integer val) {
return super.connectTimeoutForDefaultHttpClient(val);
}

/**
* Sets the read timeout value used in HttpsURLConnection connections made by {@link DefaultHttpClient},
* and is not needed if using a custom HTTP client
*
* @param val timeout value in milliseconds
* @return instance of the Builder on which method was called
*/
public T readTimeoutForDefaultHttpClient(Integer val) {
return super.readTimeoutForDefaultHttpClient(val);
}

/**
* Sets HTTP client to be used by the client application for all HTTP requests. Allows for fine
* grained configuration of HTTP client.
*
* @param val Implementation of {@link IHttpClient}
* @return instance of the Builder on which method was called
*/
public T httpClient(IHttpClient val) {
return super.httpClient(val);
}

/**
* Sets SSLSocketFactory to be used by the client application for all network communication.
* If HTTP client is set on the client application (via ClientApplication.builder().httpClient()),
* any configuration of SSL should be done on the HTTP client and not through this method.
*
* @param val an instance of SSLSocketFactory
* @return instance of the Builder on which method was called
*/
public T sslSocketFactory(SSLSocketFactory val) {
return super.sslSocketFactory(val);
}

/**
* Sets ExecutorService to be used to execute the requests.
* Developer is responsible for maintaining the lifecycle of the ExecutorService.
*
* @param val an instance of ExecutorService
* @return instance of the Builder on which method was called
*/
public T executorService(ExecutorService val) {
return super.executorService(val);
}

/**
* Sets Proxy configuration to be used by the client application (MSAL4J by default uses
* {@link javax.net.ssl.HttpsURLConnection}) for all network communication.
* If no proxy value is passed in, system defined properties are used. If HTTP client is set on
* the client application (via ClientApplication.builder().httpClient()),
* proxy configuration should be done on the HTTP client object being passed in,
* and not through this method.
*
* @param val an instance of Proxy
* @return instance of the Builder on which method was called
*/
public T proxy(Proxy val) {
return super.proxy(val);
}

/**
* Set optional correlation id to be used by the API.
* If not provided, the API generates a random UUID.
*
* @param val a string value of correlation id
* @return instance of the Builder on which method was called
*/
public T correlationId(String val) {
return super.correlationId(val);
}

abstract AbstractClientApplicationBase build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ public interface IAuthenticationResult extends Serializable {
/**
* @return various metadata relating to this authentication result
*/
AuthenticationResultMetadata metadata();
default AuthenticationResultMetadata metadata() {
return AuthenticationResultMetadata.builder().build();
}
}