-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
OidcSession.java
59 lines (48 loc) · 1.62 KB
/
OidcSession.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package io.quarkus.oidc;
import java.time.Duration;
import java.time.Instant;
import org.eclipse.microprofile.jwt.JsonWebToken;
import io.smallrye.mutiny.Uni;
public interface OidcSession {
/**
* Return the tenant identifier of the current session
*
* @return tenant id
*/
String getTenantId();
/**
* Return an {@linkplain:Instant} indicating how long will it take for the current session to expire.
*
* @deprecated This method shouldn't be used as it provides an instant corresponding to 1970-01-01T0:0:0Z plus the duration of the validity of the token, which is impractical. Please use either {@link #expiresAt()} or {@link #validFor()} depending on your requirements. This method will be removed in a later version of Quarkus.
*
* @return Instant
*/
@Deprecated(forRemoval = true, since = "2.12.0")
Instant expiresIn();
/**
* Return an {@linkplain Instant} representing the current session's expiration time
* which is a number of seconds from the epoch of 1970-01-01T0:0:0Z.
*
* @return Instant
*/
Instant expiresAt();
/**
* Return a {@linkplain Duration} indicating how long the current session will remain valid for
* starting from this method's invocation time.
*
* @return Duration
*/
Duration validFor();
/**
* Perform a local logout without a redirect to the OpenId Connect provider.
*
* @return Uni<Void>
*/
Uni<Void> logout();
/**
* Return the ID token the current session depends upon.
*
* @return id token
*/
JsonWebToken getIdToken();
}