public class AuthorizeUrl
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
build()
Creates a string representation of the URL with the configured parameters.
|
AuthorizeUrl |
withAudience(java.lang.String audience)
Sets the audience value.
|
AuthorizeUrl |
withConnection(java.lang.String connection)
Sets the connection value.
|
AuthorizeUrl |
withNonce(java.lang.String nonce)
Sets the nonce value.
|
AuthorizeUrl |
withParameter(java.lang.String name,
java.lang.String value)
Sets an additional parameter.
|
AuthorizeUrl |
withScope(java.lang.String scope)
Sets the scope value.
|
AuthorizeUrl |
withSecureCookie(boolean secureCookie)
Sets whether cookies used during the authentication flow have the
Secure attribute set or not. |
AuthorizeUrl |
withState(java.lang.String state)
Sets the state value.
|
public AuthorizeUrl withConnection(java.lang.String connection)
connection
- connection to setpublic AuthorizeUrl withSecureCookie(boolean secureCookie)
Secure
attribute set or not.
By default, cookies will be set with the Secure attribute if the responseType includes id_token
and thus requires
the SameSite=None
cookie attribute set. Setting this to false will not override this behavior,
as clients will reject cookies with SameSite=None
unless the Secure
attribute is set.
While not guaranteed by all clients, generally a cookie with the Secure
attribute will be rejected unless
served over HTTPS.secureCookie
- whether to always set the Secure attribute on all cookies.public AuthorizeUrl withAudience(java.lang.String audience)
audience
- audience to setpublic AuthorizeUrl withState(java.lang.String state)
state
- state to setpublic AuthorizeUrl withNonce(java.lang.String nonce)
nonce
- nonce to setpublic AuthorizeUrl withScope(java.lang.String scope)
scope
- scope to setpublic AuthorizeUrl withParameter(java.lang.String name, java.lang.String value)
name
- name of the parametervalue
- value of the parameter to setpublic java.lang.String build() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if it's called more than once