Class FakeOidcProvider
java.lang.Object
dev.relism.flash.ext.security.test.FakeOidcProvider
- All Implemented Interfaces:
AutoCloseable
An OpenID Provider on a random local port: discovery, keys, and a token endpoint for the
authorization code and refresh flows. Sign-in is approved at once, as
signInAs(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConsumer<dev.relism.flash.testing.FlashRequest> Sends the request with a bearertoken(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>).Refuses, from now on, any other secret or redirect URI — as a provider with this client registered would.voidclose()expiresIn(long seconds) Lifetime of the tokens sign-in and refresh issue —0expires a session at once.A signed ID token forsubject, which a resource server must never take for an access token.issuer()Who sign-in and refresh vouch for, with what extra claims; the client id is alwaysapp.A signed access token forsubject, valid five minutes, withclaimsadded —typat+jwt(RFC 9068).
-
Constructor Details
-
FakeOidcProvider
- Throws:
Exception
-
-
Method Details
-
client
Refuses, from now on, any other secret or redirect URI — as a provider with this client registered would. -
issuer
-
signInAs
Who sign-in and refresh vouch for, with what extra claims; the client id is alwaysapp. -
expiresIn
Lifetime of the tokens sign-in and refresh issue —0expires a session at once. -
token
A signed access token forsubject, valid five minutes, withclaimsadded —typat+jwt(RFC 9068). -
idToken
A signed ID token forsubject, which a resource server must never take for an access token. -
bearer
public Consumer<dev.relism.flash.testing.FlashRequest> bearer(String subject, Map<String, Object> claims) Sends the request with a bearertoken(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>). -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-