@Singleton @Requires(property="micronaut.security.token.writer.header.enabled",notEquals="false") @Requires(beans=io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration.class) public class HttpHeaderTokenWriter extends Object implements TokenWriter
Modifier and Type | Field and Description |
---|---|
protected io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration |
httpHeaderTokenWriterConfiguration |
Constructor and Description |
---|
HttpHeaderTokenWriter(io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration httpHeaderTokenWriterConfiguration) |
Modifier and Type | Method and Description |
---|---|
protected String |
getHeaderName() |
protected String |
headerValue(String token) |
void |
writeToken(MutableHttpRequest<?> request,
String token)
Writes the token to the request.
|
protected final io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration httpHeaderTokenWriterConfiguration
public HttpHeaderTokenWriter(io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration httpHeaderTokenWriterConfiguration)
httpHeaderTokenWriterConfiguration
- The HttpHeaderTokenWriter
configurationprotected String getHeaderName()
public void writeToken(MutableHttpRequest<?> request, String token)
writeToken
in interface TokenWriter
request
- The MutableHttpRequest
instancetoken
- A token ( e.g. JWT token, basic auth token...)