Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit ce6e34e

Browse files
committed
Javadoc fixes and pom config for source and javadoc jars
1 parent 2238292 commit ce6e34e

15 files changed

+98
-16
lines changed

soteria-edr1/pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,46 @@
3737
<target>1.8</target>
3838
</configuration>
3939
</plugin>
40+
41+
<!-- Configure the jar with the sources (or rather, convince Maven that we want sources at all) -->
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-source-plugin</artifactId>
45+
<version>2.4</version>
46+
<executions>
47+
<execution>
48+
<id>attach-sources</id>
49+
<goals>
50+
<goal>jar-no-fork</goal>
51+
</goals>
52+
</execution>
53+
</executions>
54+
</plugin>
55+
56+
<!-- Configure the jar with the javadoc (or rather, convince Maven that we want javadoc at all) -->
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-javadoc-plugin</artifactId>
60+
<version>2.10.3</version>
61+
<configuration>
62+
<javadocVersion>1.8</javadocVersion>
63+
<notimestamp>true</notimestamp>
64+
<splitindex>true</splitindex>
65+
<doctitle>Soteria API documentation</doctitle>
66+
<links>
67+
<link>https://docs.oracle.com/javaee/7/api/</link>
68+
</links>
69+
</configuration>
70+
<executions>
71+
<execution>
72+
<id>attach-javadocs</id>
73+
<goals>
74+
<goal>jar</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
</plugin>
79+
4080
</plugins>
4181
</build>
4282
</project>

soteria-edr1/src/main/java/javax/security/authentication/mechanism/http/HttpAuthenticationMechanism.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public interface HttpAuthenticationMechanism {
8787
* <p>
8888
* This method is called in response to an HTTP client request for a resource, and is always invoked
8989
* <strong>before</strong> any {@link Filter} or {@link HttpServlet}. Additionally this method is called
90-
* in response to {@link HttpServletRequest#authenticate(HttpServletResponse).}
90+
* in response to {@link HttpServletRequest#authenticate(HttpServletResponse)}
9191
*
9292
* <p>
9393
* Note that by default this method is <strong>always</strong> called for every request, independent of whether

soteria-edr1/src/main/java/javax/security/authentication/mechanism/http/HttpMessageContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public interface HttpMessageContext {
6464
/**
6565
* Checks if the current request is to a protected resource or not. A protected resource
6666
* is a resource (e.g. a Servlet, JSF page, JSP page etc) for which a constraint has been defined
67-
* in e.g. <code>web.xml<code>.
67+
* in e.g. <code>web.xml</code>.
6868
*
6969
* @return true if a protected resource was requested, false if a public resource was requested.
7070
*/
@@ -118,6 +118,8 @@ public interface HttpMessageContext {
118118
/**
119119
* Returns the named module option that was set on the auth module to which this context belongs.
120120
*
121+
* @param key name of the module option
122+
*
121123
* @return the named module option that was set on the auth module to which this context belongs, or null if no option with that name was set.
122124
*/
123125
String getModuleOption(String key);

soteria-edr1/src/main/java/javax/security/authentication/mechanism/http/annotation/AutoApplySession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151

5252
/**
5353
* The AutoApplySession annotation provides an application the ability to declarative designate
54-
* that an {@link AuthenticationMechanism} uses the <code>javax.servlet.http.registerSession<code>
54+
* that an {@link AuthenticationMechanism} uses the <code>javax.servlet.http.registerSession</code>
5555
* and auto applies this for every request.
5656
*
5757
* <p>
58-
* See the JASPIC specification for further details on <code>javax.servlet.http.registerSession<code>.
58+
* See the JASPIC specification for further details on <code>javax.servlet.http.registerSession</code>.
5959
*
6060
* <p>
6161
* This support is provided via an implementation of an interceptor spec interceptor that conducts the

soteria-edr1/src/main/java/javax/security/authentication/mechanism/http/annotation/BasicAuthenticationMechanismDefinition.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
* Note that contrary to what happens in some proprietary Servlet products, this
6666
* realm name <b>does not</b> couple a named identity store configuration to the
6767
* authentication mechanism.
68+
*
69+
* @return Name of realm
6870
*/
6971
String realmName() default "";
7072
}

soteria-edr1/src/main/java/javax/security/authentication/mechanism/http/annotation/RememberMe.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
*
103103
* @see Cookie#setMaxAge(int)
104104
*
105+
* @return Max age in seconds
106+
*
105107
*/
106108
@Nonbinding
107109
int cookieMaxAgeSeconds() default 86400; // 1 day
@@ -113,6 +115,8 @@
113115
* as well as default classes as specified by EL 3.0 for the {@link ELProcessor}
114116
* and the implicit object "this" which refers to the interceptor target.
115117
*
118+
* @return EL expression to determine if remember me should be used
119+
*
116120
*/
117121
@Nonbinding
118122
String isRememberMeExpression() default "";

soteria-edr1/src/main/java/javax/security/identitystore/CredentialValidationResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public enum Status {
8888
*
8989
* @param status
9090
* Validation status
91-
* @param callerName
91+
* @param callerPrincipal
9292
* Validated caller
9393
* @param groups
9494
* Groups associated with the caller from the identity store

soteria-edr1/src/main/java/javax/security/identitystore/annotation/Credentials.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,22 @@
5959

6060
/**
6161
* Name of caller. This is the name a caller uses to authenticate with.
62+
*
63+
* @return Name of caller
6264
*/
6365
String callerName();
6466

6567
/**
6668
* A text-based password used by the caller to authenticate.
69+
*
70+
* @return A text-based password
6771
*/
6872
String password();
6973

7074
/**
7175
* The optional list of groups that the specified caller is in.
76+
*
77+
* @return optional list of groups
7278
*/
7379
String[] groups() default {};
7480
}

soteria-edr1/src/main/java/javax/security/identitystore/annotation/DataBaseIdentityStoreDefinition.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
/**
6363
* Full JNDI name of the data source that provides access to the data base where the
6464
* caller identities are stored.
65+
*
66+
* @return Full JNDI name of the data source
6567
*/
6668
String dataSourceLookup() default "java:comp/DefaultDataSource"; // default data source
6769

@@ -78,7 +80,9 @@
7880
* <code>
7981
* select password from caller where name = ?
8082
* </code>
81-
* <pre>
83+
* </pre>
84+
*
85+
* @return SQL query to validate
8286
*/
8387
String callerQuery();
8488

@@ -95,18 +99,24 @@
9599
* <code>
96100
* select group_name from caller_groups where caller_name = ?
97101
* </code>
98-
* <pre>
102+
* </pre>
103+
*
104+
* @return SQL query to retrieve the groups
99105
*/
100106
String groupsQuery();
101107

102108
/**
103109
* Hash algorithm applied to plain text password for comparison with password
104110
* returned from {@link #groupsQuery()}.
111+
*
112+
* @return Hash algorithm applied to plain text password
105113
*/
106114
String hashAlgorithm() default ""; // default no hash (for now) todo: make enum?
107115

108116
/**
109117
* Encoding used for hash. TODO
118+
*
119+
* @return Encoding used for hash
110120
*/
111121
String hashEncoding() default ""; // default no encoding (for now) todo: make enum?
112122

soteria-edr1/src/main/java/javax/security/identitystore/annotation/EmbeddedIdentityStoreDefinition.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
* {@literal @}Credentials(callerName = "peter", password = "secret1", groups = { "foo", "bar" }),
6666
* {@literal @}Credentials(callerName = "john", password = "secret2", groups = { "foo", "kaz" }),
6767
* {@literal @}Credentials(callerName = "carla", password = "secret3", groups = { "foo" }) })
68-
* <code>
69-
* <pre>
68+
* </code>
69+
* </pre>
7070
*
7171
* @author Arjan Tijms
7272
*
@@ -79,6 +79,8 @@
7979

8080
/**
8181
* Defines the caller identities stored in the embedded identity store
82+
*
83+
* @return caller identities stored in the embedded identity store
8284
*/
8385
Credentials[] value() default {};
8486

soteria-edr1/src/main/java/javax/security/identitystore/annotation/LdapIdentityStoreDefinition.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@
6262
/**
6363
* URL where the LDAP server can be reached.
6464
* E.g. <code>ldap://localhost:33389"</code>
65+
*
66+
* @return URL where the LDAP server can be reached
6567
*/
6668
String url() default "";
6769

6870
/**
6971
* Base of the distinguished name that contains the caller name.
7072
* E.g. <code>ou=caller,dc=jsr375,dc=net</code>
73+
*
74+
* @return Base of the distinguished name that contains the caller name
7175
*/
7276
String callerBaseDn() default "";
7377

@@ -98,13 +102,17 @@
98102
* sn: Peter
99103
* userPassword: secret1
100104
* </code>
101-
* <pre>
105+
* </pre>
106+
*
107+
* @return Name of the attribute that contains the caller name
102108
*/
103109
String callerNameAttribute() default "uid";
104110

105111
/**
106112
* Base of the distinguished name that contains the groups
107113
* E.g. <code>ou=group,dc=jsr375,dc=net</code>
114+
*
115+
* @return Base of the distinguished name that contains the groups
108116
*/
109117
String groupBaseDn() default "";
110118

@@ -121,6 +129,8 @@
121129
* <li> {@link #groupBaseDn()} corresponds to <code>ou=group,dc=jsr375,dc=net</code> </li>
122130
* <li> <code>foo</code> is the group name that will be returned by the store when authentication succeeds</li>
123131
* </ul>
132+
*
133+
* @return Name of the attribute that contains the group name
124134
*/
125135
String groupNameAttribute() default "cn";
126136

@@ -139,7 +149,9 @@
139149
* member: uid=pete,ou=caller,dc=jsr375,dc=net
140150
* member: uid=john,ou=caller,dc=jsr375,dc=net
141151
* </code>
142-
* <pre>
152+
* </pre>
153+
*
154+
* @return DN attribute for the group DN
143155
*/
144156
String groupCallerDnAttribute() default "member";
145157

soteria-edr1/src/main/java/javax/security/identitystore/credential/RememberMeCredential.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
/**
4343
* <code>RememberMeCredential</code> represents a credential presented as a token,
4444
* for the explicit usage with the JSR 375 provided remember me function.
45-
* <p>
4645
*
4746
*/
4847
public class RememberMeCredential implements Credential {
@@ -52,7 +51,6 @@ public class RememberMeCredential implements Credential {
5251
/**
5352
* Constructor
5453
*
55-
* @param caller The caller associated with this credential
5654
* @param token The token value to compare for authentication.
5755
*/
5856
public RememberMeCredential(String token) {

soteria-edr1/src/main/java/javax/security/identitystore/credential/TokenCredential.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
/**
4343
* <code>TokenCredential</code> represents a credential presented as a token,
4444
* such as a JWT or a proprietary token value.
45-
* <p>
4645
*
4746
*/
4847
public class TokenCredential implements Credential {

soteria-edr1/src/main/java/org/glassfish/soteria/mechanisms/jaspic/DefaultAuthConfigProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public DefaultAuthConfigProvider(ServerAuthModule serverAuthModule) {
3131
/**
3232
* Constructor with signature and implementation that's required by API.
3333
*
34-
* @param properties
35-
* @param factory
34+
* @param properties provider properties
35+
* @param factory the auth config factory
3636
*/
3737
public DefaultAuthConfigProvider(Map<String, String> properties, AuthConfigFactory factory) {
3838
this.providerProperties = properties;

soteria-edr1/src/main/java/org/glassfish/soteria/mechanisms/jaspic/Jaspic.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ public static AuthStatus getLastStatus(HttpServletRequest request) {
233233
* user is going to be authenticated (as opposed to using the handler for the "do nothing" protocol
234234
* which uses the unauthenticated identity).
235235
*
236+
* @param request The involved HTTP servlet request.
237+
*
236238
*/
237239
public static void setDidAuthentication(HttpServletRequest request) {
238240
request.setAttribute(DID_AUTHENTICATION, TRUE);
@@ -243,6 +245,11 @@ public static void setDidAuthentication(HttpServletRequest request) {
243245
* the current request.
244246
* Does not necessarily mean that authentication has indeed succeeded, for this
245247
* the actual user/caller principal should be checked as well.
248+
*
249+
* @param request The involved HTTP servlet request.
250+
*
251+
* @return true if a SAM has indicated that it intended authentication to be happening during
252+
* the current request.
246253
*
247254
*/
248255
public static boolean isDidAuthentication(HttpServletRequest request) {

0 commit comments

Comments
 (0)