浏览代码

SEC-1355: Update manual code snippet to cast to OpenIDAuthenticationToken.

Luke Taylor 15 年之前
父节点
当前提交
68ae49ebe1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/manual/src/docbook/namespace-config.xml

+ 1 - 1
docs/manual/src/docbook/namespace-config.xml

@@ -511,7 +511,7 @@
           attributes supported will depend on your OpenID provider. The attribute values are
           attributes supported will depend on your OpenID provider. The attribute values are
           returned as part of the authentication process and can be accessed afterwards using the
           returned as part of the authentication process and can be accessed afterwards using the
           following
           following
-          code:<programlisting language="java">OpenIDAuthenticationToken token = SecurityContextHolder.getContext().getAuthentication();
+          code:<programlisting language="java">OpenIDAuthenticationToken token = (OpenIDAuthenticationToken)SecurityContextHolder.getContext().getAuthentication();
 List&lt;OpenIDAttribute> attributes = token.getAttributes();</programlisting>The
 List&lt;OpenIDAttribute> attributes = token.getAttributes();</programlisting>The
             <classname>OpenIDAttribute</classname> contains the attribute type and the retrieved
             <classname>OpenIDAttribute</classname> contains the attribute type and the retrieved
           value (or values in the case of multi-valued attributes). We'll see more about how the
           value (or values in the case of multi-valued attributes). We'll see more about how the