@Singleton @Requires(property="micronaut.security.token.writer.header.enabled",notEquals="false") @Requires(beans=io.micronaut.security.token.writer.HttpHeaderTokenWriterConfiguration.class) public class HttpHeaderTokenWriter extends java.lang.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 java.lang.String |
getHeaderName() |
protected java.lang.String |
headerValue(java.lang.String token) |
void |
writeToken(io.micronaut.http.MutableHttpRequest<?> request,
java.lang.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 java.lang.String getHeaderName()
public void writeToken(io.micronaut.http.MutableHttpRequest<?> request, java.lang.String token)
writeToken
in interface TokenWriter
request
- The MutableHttpRequest
instancetoken
- A token ( e.g. JWT token, basic auth token...)protected java.lang.String headerValue(java.lang.String token)
token
- the token being written