本文整理了Java中com.nimbusds.jose.Payload.toBase64URL()
方法的一些代码示例,展示了Payload.toBase64URL()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.toBase64URL()
方法的具体详情如下:
包路径:com.nimbusds.jose.Payload
类名称:Payload
方法名:toBase64URL
[英]Returns a Base64URL representation of this payload.
[中]返回此有效负载的Base64URL表示形式。
代码示例来源:origin: com.nimbusds/nimbus-jose-jwt
/**
* Creates a new to-be-signed JSON Web Signature (JWS) object with the
* specified header and payload. The initial state will be
* {@link State#UNSIGNED unsigned}.
*
* @param header The JWS header. Must not be {@code null}.
* @param payload The payload. Must not be {@code null}.
*/
public JWSObject(final JWSHeader header, final Payload payload) {
if (header == null) {
throw new IllegalArgumentException("The JWS header must not be null");
}
this.header = header;
if (payload == null) {
throw new IllegalArgumentException("The payload must not be null");
}
setPayload(payload);
signingInputString = composeSigningInput(header.toBase64URL(), payload.toBase64URL());
signature = null;
state = State.UNSIGNED;
}
代码示例来源:origin: com.nimbusds/nimbus-jose-jwt
/**
* Serialises this unsecured JOSE object to its compact format
* consisting of Base64URL-encoded parts delimited by period ('.')
* characters.
*
* <pre>
* [header-base64url].[payload-base64url].[]
* </pre>
*
* @return The serialised unsecured JOSE object.
*/
@Override
public String serialize() {
return header.toBase64URL().toString() + '.' + getPayload().toBase64URL().toString() + '.';
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
return SignedJWT.parse(jwt.getPayload().toBase64URL().decodeToString());
内容来源于网络,如有侵权,请联系作者删除!