Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java SAML2.0请求编码_Java_Authentication_Url Encoding_Saml 2.0 - Fatal编程技术网

Java SAML2.0请求编码

Java SAML2.0请求编码,java,authentication,url-encoding,saml-2.0,Java,Authentication,Url Encoding,Saml 2.0,我试图用Java对SAML2.0请求进行编码,但当我使用在线工具对其进行解码时,会得到奇怪的字符 这是输入字符串: <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="_8d7bd828-6f91-477a-b158-22d693f56972" Version="2.0" IssueInstant="2013-04-19T14:07:53Z" AssertionConsumerSer

我试图用Java对SAML2.0请求进行编码,但当我使用在线工具对其进行解码时,会得到奇怪的字符

这是输入字符串:

<samlp:AuthnRequest 
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" 
ID="_8d7bd828-6f91-477a-b158-22d693f56972" 
Version="2.0" 
IssueInstant="2013-04-19T14:07:53Z" 
AssertionConsumerServiceURL="http://test">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
test
</saml:Issuer>
<samlp:NameIDPolicy 
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" 
AllowCreate="true" />
</samlp:AuthnRequest>
当我通过在线解码工具运行结果字符串时,我得到以下结果:

x?}?Mk?@??J????ILL@??`?0??^"??B???Gm?}W?`/^?03????,,­????
?=Z}??pT??[iA?-8??q
?I
??N
?h???GYN?\pZ?"?Y:??Pt9mS??<-D?$zCc?V                 
Ah?A??+Zq??8??|?d??$ZZ???J+?4
?/)?u????Kf?d>9??2.cf?-X?<?&??zq?K??A?O???ImZ??`76W???n?~???6
w?m?????
^???$????ie?;??3-I??k??7????Srtion">
test
</saml:Issuer>
<samlp:NameIDPolicy 
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" 
AllowCreate="true" />
</samlp:AuthnRequest>
x?}Mk?@?J?ILL@`?0^?B?Gm?}W`/^?03????
?=Z}pT???[iA?-8±q
我
N

h???GYN?\pZ??Y:?Pt9mS?9?2.cf?-X?您需要先使用URL解码器,然后再使用Base64解码器,这就是您正在做的吗?

能否请您先向URL解码器提供示例代码,然后再向Base64解码器提供示例代码?请尽早回复。。
x?}?Mk?@??J????ILL@??`?0??^"??B???Gm?}W?`/^?03????,,­????
?=Z}??pT??[iA?-8??q
?I
??N
?h???GYN?\pZ?"?Y:??Pt9mS??<-D?$zCc?V                 
Ah?A??+Zq??8??|?d??$ZZ???J+?4
?/)?u????Kf?d>9??2.cf?-X?<?&??zq?K??A?O???ImZ??`76W???n?~???6
w?m?????
^???$????ie?;??3-I??k??7????Srtion">
test
</saml:Issuer>
<samlp:NameIDPolicy 
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" 
AllowCreate="true" />
</samlp:AuthnRequest>