Skip to content

Commit a96dbd8

Browse files
Update javadoc
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 23fa294 commit a96dbd8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

cas/src/main/java/org/springframework/security/cas/web/authentication/DefaultServiceAuthenticationDetails.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ public String toString() {
100100
/**
101101
* If present, removes the artifactParameterName and the corresponding value from the
102102
* query String.
103-
* @param request
103+
* @param request the current {@link HttpServletRequest} to obtain the
104+
* {@link #getServiceUrl()} from.
105+
* @param artifactPattern the {@link Pattern} that will be used to clean up the query
106+
* string from containing the artifact name and value. This can be created using
107+
* {@link #createArtifactPattern(String)}.
104108
* @return the query String minus the artifactParameterName and the corresponding
105109
* value.
106110
*/
@@ -121,8 +125,10 @@ private String getQueryString(final HttpServletRequest request, final Pattern ar
121125
* Creates a {@link Pattern} that can be passed into the constructor. This allows the
122126
* {@link Pattern} to be reused for every instance of
123127
* {@link DefaultServiceAuthenticationDetails}.
124-
* @param artifactParameterName
125-
* @return
128+
* @param artifactParameterName the artifactParameterName that is removed from the
129+
* current URL. The result becomes the service url. Cannot be null and cannot be an
130+
* empty String.
131+
* @return a {@link Pattern}
126132
*/
127133
static Pattern createArtifactPattern(String artifactParameterName) {
128134
Assert.hasLength(artifactParameterName, "artifactParameterName is expected to have a length");

core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ public final boolean isFullyAuthenticated() {
167167
/**
168168
* Convenience method to access {@link Authentication#getPrincipal()} from
169169
* {@link #getAuthentication()}
170-
* @return
170+
* @return the <code>Principal</code> being authenticated or the authenticated
171+
* principal after authentication.
171172
*/
172173
public @Nullable Object getPrincipal() {
173174
return getAuthentication().getPrincipal();
@@ -228,9 +229,9 @@ public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) {
228229
/**
229230
* Prefixes role with defaultRolePrefix if defaultRolePrefix is non-null and if role
230231
* does not already start with defaultRolePrefix.
231-
* @param defaultRolePrefix
232-
* @param role
233-
* @return
232+
* @param defaultRolePrefix the default prefix to add to roles.
233+
* @param role the role that should be required.
234+
* @return a {@code String} role
234235
*/
235236
private static String getRoleWithDefaultPrefix(@Nullable String defaultRolePrefix, String role) {
236237
if (role == null) {

0 commit comments

Comments
 (0)