Record Class DefaultResponse
java.lang.Object
java.lang.Record
org.apereo.cas.authentication.principal.DefaultResponse
- All Implemented Interfaces:
Serializable
,org.apereo.cas.authentication.principal.Response
public record DefaultResponse(org.apereo.cas.authentication.principal.Response.ResponseType responseType, String url, Map<String,String> attributes)
extends Record
implements org.apereo.cas.authentication.principal.Response
Encapsulates a Response to send back for a particular service.
- Since:
- 3.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apereo.cas.authentication.principal.Response
org.apereo.cas.authentication.principal.Response.ResponseType
-
Constructor Summary
ConstructorDescriptionDefaultResponse
(org.apereo.cas.authentication.principal.Response.ResponseType responseType, String url, Map<String, String> attributes) Creates an instance of aDefaultResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributes
record component.final boolean
Indicates whether some other object is "equal to" this one.static org.apereo.cas.authentication.principal.Response
getHeaderResponse
(String url, Map<String, String> attributes) Gets header response.static org.apereo.cas.authentication.principal.Response
getPostResponse
(String url, Map<String, String> attributes) Gets the post response.static org.apereo.cas.authentication.principal.Response
getRedirectResponse
(String url, Map<String, String> parameters) Gets the redirect response.final int
hashCode()
Returns a hash code value for this object.org.apereo.cas.authentication.principal.Response.ResponseType
Returns the value of theresponseType
record component.final String
toString()
Returns a string representation of this record class.url()
Returns the value of theurl
record component.
-
Constructor Details
-
DefaultResponse
public DefaultResponse(org.apereo.cas.authentication.principal.Response.ResponseType responseType, String url, Map<String, String> attributes) Creates an instance of aDefaultResponse
record class.- Parameters:
responseType
- the value for theresponseType
record componenturl
- the value for theurl
record componentattributes
- the value for theattributes
record component
-
-
Method Details
-
getPostResponse
public static org.apereo.cas.authentication.principal.Response getPostResponse(String url, Map<String, String> attributes) Gets the post response.- Parameters:
url
- the urlattributes
- the attributes- Returns:
- the post response
-
getHeaderResponse
public static org.apereo.cas.authentication.principal.Response getHeaderResponse(String url, Map<String, String> attributes) Gets header response.- Parameters:
url
- the urlattributes
- the attributes- Returns:
- the header response
-
getRedirectResponse
public static org.apereo.cas.authentication.principal.Response getRedirectResponse(String url, Map<String, String> parameters) Gets the redirect response.- Parameters:
url
- the urlparameters
- the parameters- Returns:
- the redirect response
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
responseType
public org.apereo.cas.authentication.principal.Response.ResponseType responseType()Returns the value of theresponseType
record component.- Specified by:
responseType
in interfaceorg.apereo.cas.authentication.principal.Response
- Returns:
- the value of the
responseType
record component
-
url
Returns the value of theurl
record component.- Specified by:
url
in interfaceorg.apereo.cas.authentication.principal.Response
- Returns:
- the value of the
url
record component
-
attributes
Returns the value of theattributes
record component.- Specified by:
attributes
in interfaceorg.apereo.cas.authentication.principal.Response
- Returns:
- the value of the
attributes
record component
-