io.jsonwebtoken.Clock Java Examples

The following examples show how to use io.jsonwebtoken.Clock. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultJwtParser.java    From jjwt with Apache License 2.0 6 votes vote down vote up
DefaultJwtParser(SigningKeyResolver signingKeyResolver,
                 Key key,
                 byte[] keyBytes,
                 Clock clock,
                 long allowedClockSkewMillis,
                 Claims expectedClaims,
                 Decoder<String, byte[]> base64UrlDecoder,
                 Deserializer<Map<String, ?>> deserializer,
                 CompressionCodecResolver compressionCodecResolver) {
    this.signingKeyResolver = signingKeyResolver;
    this.key = key;
    this.keyBytes = keyBytes;
    this.clock = clock;
    this.allowedClockSkewMillis = allowedClockSkewMillis;
    this.expectedClaims = expectedClaims;
    this.base64UrlDecoder = base64UrlDecoder;
    this.deserializer = deserializer;
    this.compressionCodecResolver = compressionCodecResolver;
}
 
Example #2
Source File: SmsVerificationJwtVerifier.java    From daming with Apache License 2.0 4 votes vote down vote up
public SmsVerificationJwtVerifier(Key publicKey, Clock clock) {
    this.publicKey = publicKey;
    this.clock = clock;
}
 
Example #3
Source File: JjwtConfiguration.java    From daming with Apache License 2.0 4 votes vote down vote up
@Bean(name = "jjwt.ZonedClock")
public Clock clock() {
    return new ZonedClock();
}
 
Example #4
Source File: JwtConfiguration.java    From daming with Apache License 2.0 4 votes vote down vote up
@ConditionalOnMissingBean(SmsVerificationJwtVerifier.class)
@Bean
public SmsVerificationJwtVerifier smsVerificationJwtVerifier(JwtPublicKeyLoader jwtPublicKeyLoader, Clock clock) {
    return new SmsVerificationJwtVerifier(jwtPublicKeyLoader.getKey(), clock);
}
 
Example #5
Source File: DefaultJwtParser.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public JwtParser setClock(Clock clock) {
    Assert.notNull(clock, "Clock instance cannot be null.");
    this.clock = clock;
    return this;
}
 
Example #6
Source File: ImmutableJwtParser.java    From jjwt with Apache License 2.0 4 votes vote down vote up
@Override
public JwtParser setClock(Clock clock) {
    throw doNotMutate();
}
 
Example #7
Source File: DefaultJwtParser.java    From jjwt with Apache License 2.0 4 votes vote down vote up
@Override
public JwtParser setClock(Clock clock) {
    Assert.notNull(clock, "Clock instance cannot be null.");
    this.clock = clock;
    return this;
}
 
Example #8
Source File: DefaultJwtParserBuilder.java    From jjwt with Apache License 2.0 4 votes vote down vote up
@Override
public JwtParserBuilder setClock(Clock clock) {
    Assert.notNull(clock, "Clock instance cannot be null.");
    this.clock = clock;
    return this;
}