Skip to content

Commit f58214f

Browse files
authored
Merge pull request #557 from AzureAD/add-plugins-for-gpg-signing
plugins for GPG signing
2 parents 1381cf0 + ffa0256 commit f58214f

File tree

3 files changed

+179
-12
lines changed

3 files changed

+179
-12
lines changed

msal4j-brokers/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# Intellij
23+
../.idea/
24+
25+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
26+
hs_err_pid*
27+
28+
# Lombok
29+
target/*

msal4j-brokers/pom.xml

Lines changed: 119 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,129 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6-
<packaging>jar</packaging>
76
<groupId>com.microsoft.azure</groupId>
87
<artifactId>msal4j-brokers</artifactId>
98
<version>0.0.1</version>
9+
<packaging>jar</packaging>
10+
<name>msal4j-brokers</name>
11+
<description>
12+
Microsoft Authentication Library for Java - Brokers helps you integrate with the broker
13+
on windows machine to secure Access tokens and refresh tokens.
14+
</description>
15+
<url>https://github.com/AzureAD/microsoft-authentication-library-for-java</url>
16+
<licenses>
17+
<license>
18+
<name>MIT License</name>
19+
</license>
20+
</licenses>
21+
<inceptionYear>2022</inceptionYear>
22+
<scm>
23+
<url>https://github.com/AzureAD/microsoft-authentication-library-for-java</url>
24+
</scm>
25+
<properties>
26+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27+
</properties>
1028
<dependencies>
11-
<!-- https://mvnrepository.com/artifact/com.microsoft.azure/msal4j -->
12-
<dependency>
13-
<groupId>com.microsoft.azure</groupId>
14-
<artifactId>msal4j</artifactId>
15-
<version>1.13.1</version>
16-
</dependency>
17-
<dependency>
18-
<groupId>net.java.dev.jna</groupId>
19-
<artifactId>jna-platform</artifactId>
20-
<version>5.12.1</version>
21-
</dependency>
29+
<!-- https://mvnrepository.com/artifact/com.microsoft.azure/msal4j -->
30+
<dependency>
31+
<groupId>com.microsoft.azure</groupId>
32+
<artifactId>msal4j</artifactId>
33+
<version>1.13.2</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.projectlombok</groupId>
37+
<artifactId>lombok</artifactId>
38+
<version>1.18.6</version>
39+
<scope>provided</scope>
40+
</dependency>
2241
</dependencies>
2342

43+
<!-- force https -->
44+
<repositories>
45+
<repository>
46+
<id>central</id>
47+
<url>https://repo1.maven.org/maven2</url>
48+
<snapshots>
49+
<enabled>false</enabled>
50+
</snapshots>
51+
</repository>
52+
</repositories>
53+
<pluginRepositories>
54+
<pluginRepository>
55+
<id>central</id>
56+
<url>https://repo1.maven.org/maven2</url>
57+
<snapshots>
58+
<enabled>false</enabled>
59+
</snapshots>
60+
</pluginRepository>
61+
</pluginRepositories>
62+
<build>
63+
<sourceDirectory>${project.build.directory}/delombok</sourceDirectory>
64+
<plugins>
65+
<plugin>
66+
<groupId>org.projectlombok</groupId>
67+
<artifactId>lombok-maven-plugin</artifactId>
68+
<version>1.18.2.0</version>
69+
<executions>
70+
<execution>
71+
<goals>
72+
<goal>delombok</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
<configuration>
77+
<sourceDirectory>src/main/java</sourceDirectory>
78+
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
79+
<addOutputDirectory>false</addOutputDirectory>
80+
</configuration>
81+
</plugin>
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-surefire-plugin</artifactId>
85+
<version>2.10</version>
86+
<configuration>
87+
<argLine>-noverify</argLine>
88+
</configuration>
89+
</plugin>
90+
<plugin>
91+
<groupId>org.apache.maven.plugins</groupId>
92+
<artifactId>maven-javadoc-plugin</artifactId>
93+
<version>3.1.0</version>
94+
<configuration>
95+
<sourcepath>${project.build.directory}/delombok</sourcepath>
96+
</configuration>
97+
<executions>
98+
<execution>
99+
<id>attach-javadocs</id>
100+
<goals>
101+
<goal>jar</goal>
102+
</goals>
103+
</execution>
104+
</executions>
105+
</plugin>
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-source-plugin</artifactId>
109+
<version>2.2.1</version>
110+
<executions>
111+
<execution>
112+
<id>attach-sources</id>
113+
<goals>
114+
<goal>jar</goal>
115+
</goals>
116+
</execution>
117+
</executions>
118+
</plugin>
119+
<plugin>
120+
<groupId>org.apache.maven.plugins</groupId>
121+
<artifactId>maven-compiler-plugin</artifactId>
122+
<version>3.7.0</version>
123+
<configuration>
124+
<source>8</source>
125+
<target>8</target>
126+
</configuration>
127+
</plugin>
128+
</plugins>
129+
</build>
130+
24131
</project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.microsoft.aad.msal4jbrokers;
2+
3+
import com.microsoft.aad.msal4j.*;
4+
import lombok.extern.slf4j.Slf4j;
5+
6+
import java.util.concurrent.CompletableFuture;
7+
8+
@Slf4j
9+
public class MSALRuntimeBroker implements IBroker {
10+
11+
@Override
12+
public IAuthenticationResult acquireToken(PublicClientApplication application, SilentParameters requestParameters) {
13+
log.debug("Should not call this API if msal runtime init failed");
14+
throw new MsalClientException("Broker implementation missing", "missing_broker");
15+
}
16+
17+
@Override
18+
public IAuthenticationResult acquireToken(PublicClientApplication application, InteractiveRequestParameters requestParameters) {
19+
throw new MsalClientException("Broker implementation missing", "missing_broker");
20+
}
21+
22+
@Override
23+
public IAuthenticationResult acquireToken(PublicClientApplication application, UserNamePasswordParameters requestParameters) {
24+
throw new MsalClientException("Broker implementation missing", "missing_broker");
25+
}
26+
27+
@Override
28+
public CompletableFuture removeAccount(IAccount account) {
29+
throw new MsalClientException("Broker implementation missing", "missing_broker");
30+
}
31+
}

0 commit comments

Comments
 (0)