Record Class ApiKeyAuth
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.ApiKeyAuth
- Record Components:
name- the header name or query-parameter name; must not be blankvalue- the key value (typically a${ENV}reference, resolved when the request is made); must not be nulllocation- whethername/valueis sent as a header or a query parameter; must not be null
- All Implemented Interfaces:
AuthSpec
public record ApiKeyAuth(String name, String value, ApiKeyAuth.ApiKeyLocation location)
extends Record
implements AuthSpec
API-key authentication: the connector sends a named key either as a request
header or as a URL query parameter.
Syntax:
auth: apikey("X-API-Key", "${KEY}") // header (default)
auth: apikey(query("api_key"), "${KEY}") // URL query parameter
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionApiKeyAuth(String name, String value, ApiKeyAuth.ApiKeyLocation location) Creates an instance of aApiKeyAuthrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-