Skip to content

Commit 4e34990

Browse files
committed
Add missing language attributes to programlisting tags for highlighting.
1 parent 5caa417 commit 4e34990

27 files changed

+144
-138
lines changed

docs/docs.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Docbook and Javadoc building and uploading tasks
1+
// Docbook and Javadoc building and uploading tasks
22
apply plugin: 'base'
33

44
task docs {
@@ -47,6 +47,12 @@ project('manual') {
4747
}
4848
}
4949

50+
task reference (type: Copy) {
51+
dependsOn 'manual:docbook'
52+
destinationDir = buildDir
53+
with(project('manual').spec)
54+
}
55+
5056
task apidocs(type: Javadoc) {
5157
destinationDir = new File(buildDir, 'apidocs')
5258
title = "Spring Security $version API"

docs/faq/src/docbook/faq.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
<answer><para>Make sure you have added the listener to your web.xml file. It is
283283
essential to make sure that the Spring Security session registry is notified
284284
when a session is destroyed. Without it, the session information will not be
285-
removed from the registry.</para><programlisting><![CDATA[
285+
removed from the registry.</para><programlisting language="xml"><![CDATA[
286286
<listener>
287287
<listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
288288
</listener> ]]>

docs/manual/src/docbook/anon-auth-provider.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<classname>SecurityContextHolder</classname> if there is no existing
5555
<interfacename>Authentication</interfacename> held there. The definition of the filter
5656
and authentication provider appears as follows:</para>
57-
<para> <programlisting>
57+
<para> <programlisting language="xml">
5858
<![CDATA[
5959
<bean id="anonymousAuthFilter"
6060
class="org.springframework.security.web.authentication.AnonymousAuthenticationFilter">
@@ -89,7 +89,7 @@
8989
<literal>InMemoryDaoImpl</literal>'s <literal>userMap</literal> property.</para>
9090
<para>As explained earlier, the benefit of anonymous authentication is that all URI patterns
9191
can have security applied to them. For example:</para>
92-
<para> <programlisting>
92+
<para> <programlisting language="xml">
9393
<![CDATA[
9494
<bean id="filterSecurityInterceptor"
9595
class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor">

docs/manual/src/docbook/appendix-db-schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ create table acl_entry (
136136
<section>
137137
<title>PostgreSQL</title>
138138
<para>
139-
<programlisting>create table acl_sid(
139+
<programlisting language="ddl">create table acl_sid(
140140
id bigserial not null primary key,
141141
principal boolean not null,
142142
sid varchar(100) not null,

docs/manual/src/docbook/appendix-namespace.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@
602602
<interfacename>AuthenticationProvider</interfacename> implementation (or want to
603603
configure one of Spring Security's own implementations as a traditional bean for
604604
some reason, then you can use the following syntax to add it to the internal
605-
<classname>ProviderManager</classname>'s list: <programlisting><![CDATA[
605+
<classname>ProviderManager</classname>'s list: <programlisting language="xml"><![CDATA[
606606
<security:authentication-manager>
607607
<security:authentication-provider ref="myAuthenticationProvider" />
608608
</security:authentication-manager>

docs/manual/src/docbook/authorization-common.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<interfacename>AccessDecisionManager</interfacename>s when making authorization
1818
decisions.</para>
1919
<para><interfacename>GrantedAuthority</interfacename> is an interface with only one method:
20-
<programlisting>
20+
<programlisting language="java">
2121
String getAuthority();
2222
</programlisting> This method allows
2323
<interfacename>AccessDecisionManager</interfacename>s to obtain a precise
@@ -63,7 +63,7 @@
6363
final access control decisions. The
6464
<interfacename>AccessDecisionManager</interfacename> interface contains three
6565
methods:
66-
<programlisting>
66+
<programlisting language="java">
6767
void decide(Authentication authentication, Object secureObject,
6868
Collection&lt;ConfigAttribute&gt; attrs) throws AccessDeniedException;
6969
boolean supports(ConfigAttribute attribute);
@@ -112,7 +112,7 @@
112112
based on its assessment of the votes.</para>
113113
<para>The <interfacename>AccessDecisionVoter</interfacename> interface has three
114114
methods:
115-
<programlisting>
115+
<programlisting language="java">
116116
int vote(Authentication authentication, Object object, Collection&lt;ConfigAttribute&gt; attrs);
117117
boolean supports(ConfigAttribute attribute);
118118
boolean supports(Class clazz);
@@ -243,15 +243,15 @@ boolean supports(Class clazz);
243243
<para>A common services layer method we've all written at one stage or another looks like
244244
this:</para>
245245
<para>
246-
<programlisting>public Contact getById(Integer id);</programlisting>
246+
<programlisting language="java">public Contact getById(Integer id);</programlisting>
247247
</para>
248248
<para>Quite often, only principals with permission to read the <literal>Contact</literal>
249249
should be allowed to obtain it. In this situation the
250250
<interfacename>AccessDecisionManager</interfacename> approach provided by the
251251
<classname>AbstractSecurityInterceptor</classname> will not suffice. This is because the
252252
identity of the <literal>Contact</literal> is all that is available before the secure object
253253
is invoked. The <classname>AclEntryAfterInvocationProvider</classname> delivers a solution,
254-
and is configured as follows: <programlisting><![CDATA[
254+
and is configured as follows: <programlisting language="xml"><![CDATA[
255255
<bean id="afterAclRead"
256256
class="org.springframework.security.acls.afterinvocation.AclEntryAfterInvocationProvider">
257257
<constructor-arg ref="aclService"/>
@@ -274,7 +274,7 @@ boolean supports(Class clazz);
274274
<classname>AclEntryAfterInvocationCollectionFilteringProvider</classname>. It is designed
275275
to remove <literal>Collection</literal> or array elements for which a principal does not
276276
have access. It never thrown an <classname>AccessDeniedException</classname> - simply
277-
silently removes the offending elements. The provider is configured as follows: <programlisting><![CDATA[
277+
silently removes the offending elements. The provider is configured as follows: <programlisting language="xml"><![CDATA[
278278
<bean id="afterAclCollectionRead"
279279
class="org.springframework.security.acls.afterinvocation.AclEntryAfterInvocationCollectionFilteringProvider">
280280
<constructor-arg ref="aclService"/>
@@ -311,7 +311,7 @@ boolean supports(Class clazz);
311311
<classname>RoleHierarchyVoter</classname>, is configured with a <interfacename>RoleHierarchy</interfacename>,
312312
from which it obtains all the <quote>reachable authorities</quote> which the user is assigned.
313313
A typical configuration might look like this:
314-
<programlisting><![CDATA[
314+
<programlisting language="xml"><![CDATA[
315315
<bean id="roleVoter" class="org.springframework.security.access.vote.RoleHierarchyVoter">
316316
<constructor-arg ref="roleHierarchy" />
317317
</class>

docs/manual/src/docbook/basic-and-digest-auth.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
a "nonce". This is a value the server generates. Spring Security's nonce adopts the
8080
following format:</para>
8181
<para>
82-
<programlisting>
82+
<programlisting language="txt">
8383
base64(expirationTime + ":" + md5Hex(expirationTime + ":" + key))
8484

8585
expirationTime: The date and time when the nonce expires, expressed in milliseconds
@@ -120,7 +120,7 @@
120120
<literal>DigestAuthenticationFilter</literal> in the filter chain. The application
121121
context will need to define the <literal>DigestAuthenticationFilter</literal> and
122122
its required collaborators:</para>
123-
<para> <programlisting><![CDATA[
123+
<para> <programlisting language="xml"><![CDATA[
124124
<bean id="digestFilter" class=
125125
"org.springframework.security.web.authentication.www.DigestAuthenticationFilter">
126126
<property name="userDetailsService" ref="jdbcDaoImpl"/>

docs/manual/src/docbook/cas-auth-provider.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
required. </para>
215215
<para>You will need to add a <classname>ServiceProperties</classname> bean to your
216216
application context. This represents your CAS service:</para>
217-
<para> <programlisting><![CDATA[
217+
<para> <programlisting language="xml"><![CDATA[
218218
<bean id="serviceProperties"
219219
class="org.springframework.security.cas.ServiceProperties">
220220
<property name="service"
@@ -230,7 +230,7 @@
230230
order to gain access to the service.</para>
231231
<para>The following beans should be configured to commence the CAS authentication process
232232
(assuming you're using a namespace configuration):</para>
233-
<para> <programlisting><![CDATA[
233+
<para> <programlisting language="xml"><![CDATA[
234234
<security:http entry-point-ref="casEntryPoint">
235235
...
236236
<custom-filter position="FORM_LOGIN_FILTER" ref="myFilter" />
@@ -262,7 +262,7 @@
262262
to the enterprise's CAS login server. This is where the user's browser will be
263263
redirected.</para>
264264
<para>Next you need to add a <literal>CasAuthenticationProvider</literal> and its
265-
collaborators: <programlisting><![CDATA[
265+
collaborators: <programlisting language="xml"><![CDATA[
266266
<security:authentication-manager alias="authenticationManager">
267267
<security:authentication-provider ref="casAuthenticationProvider" />
268268
</security:authentication-manager>
@@ -306,7 +306,7 @@
306306
<literal>ProxyTicketReceptor</literal> by adding the following to your
307307
web application's <literal>web.xml</literal>:</para>
308308
309-
<para><programlisting>
309+
<para><programlisting language="xml">
310310
&lt;servlet&gt;
311311
&lt;servlet-name&gt;casproxy&lt;/servlet-name&gt;
312312
&lt;servlet-class&gt;edu.yale.its.tp.cas.proxy.ProxyTicketReceptor&lt;/servlet-class&gt;

docs/manual/src/docbook/channel-security.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<literal>&lt;intercept-url&gt;</literal> element and this is the simplest (and
3838
recommended approach).</para>
3939
<para>To configure channel security explicitly, you would define the following the filter in
40-
your application context: <programlisting><![CDATA[
40+
your application context: <programlisting language="xml"><![CDATA[
4141
<bean id="channelProcessingFilter"
4242
class="org.springframework.security.web.access.channel.ChannelProcessingFilter">
4343
<property name="channelDecisionManager" ref="channelDecisionManager"/>

docs/manual/src/docbook/core-filters.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
xlink:href="#tech-intro-sec-context-persistence">Technical Overview</link> chapter so
200200
you might want to re-read that section at this point. Let's first take a look at how you
201201
would configure it for use with a <classname>FilterChainProxy</classname>. A basic
202-
configuration only requires the bean itself <programlisting><![CDATA[
202+
configuration only requires the bean itself <programlisting language="xml"><![CDATA[
203203
<bean id="securityContextPersistenceFilter"
204204
class="org.springframework.security.web.context.SecurityContextPersistenceFilter"/>
205205
]]></programlisting> As we saw previously, this filter has two main tasks. It is responsible for
@@ -291,7 +291,7 @@ public interface SecurityContextRepository {
291291
</orderedlist> The login form simply contains <literal>j_username</literal> and
292292
<literal>j_password</literal> input fields, and posts to the URL that is monitored by
293293
the filter (by default this is <literal>/j_spring_security_check</literal>). The basic
294-
filter configuration looks something like this: <programlisting><![CDATA[
294+
filter configuration looks something like this: <programlisting language="xml"><![CDATA[
295295
<bean id="authenticationFilter" class=
296296
"org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter">
297297
<property name="authenticationManager" ref="authenticationManager"/>

0 commit comments

Comments
 (0)