-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22163 from sberyozkin/oidc_session
Add OidcSession interface
- Loading branch information
Showing
19 changed files
with
424 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcSession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.quarkus.oidc; | ||
|
||
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. | ||
* | ||
* @return | ||
*/ | ||
Instant expiresIn(); | ||
|
||
/** | ||
* 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(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.