Package org.entur.jwt.client
Class UrlAccessTokenProvider
java.lang.Object
org.entur.jwt.client.AbstractUrlAccessTokenProvider<HttpURLConnection>
org.entur.jwt.client.UrlAccessTokenProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,AccessTokenHealthProvider,AccessTokenProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected static final org.slf4j.Loggerprotected final intFields inherited from class org.entur.jwt.client.AbstractUrlAccessTokenProvider
CONTENT_TYPE, issueBody, issueHeaders, issueUrl, KEY_GRANT_TYPE, reader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamgetResponseContent(HttpURLConnection response) protected intgetResponseStatusCode(HttpURLConnection response) protected StringBuilderprintHeadersIfPresent(HttpURLConnection c, String... headerNames) protected static StringBuilderprintHttpURLConnectionHeadersIfPresent(HttpURLConnection c, String... headerNames) protected HttpURLConnectionbooleanMethods inherited from class org.entur.jwt.client.AbstractUrlAccessTokenProvider
checkArgument, close, createBody, encode, getAccessToken, getToken, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.entur.jwt.client.AccessTokenHealthProvider
getHealth
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
connectTimeout
protected final int connectTimeout -
readTimeout
protected final int readTimeout
-
-
Constructor Details
-
UrlAccessTokenProvider
-
-
Method Details
-
printHttpURLConnectionHeadersIfPresent
protected static StringBuilder printHttpURLConnectionHeadersIfPresent(HttpURLConnection c, String... headerNames) -
request
protected HttpURLConnection request(URL url, byte[] body, Map<String, Object> headers) throws IOException- Specified by:
requestin classAbstractUrlAccessTokenProvider<HttpURLConnection>- Throws:
IOException
-
getResponseStatusCode
- Specified by:
getResponseStatusCodein classAbstractUrlAccessTokenProvider<HttpURLConnection>- Throws:
IOException
-
getResponseContent
- Specified by:
getResponseContentin classAbstractUrlAccessTokenProvider<HttpURLConnection>- Throws:
IOException
-
printHeadersIfPresent
- Specified by:
printHeadersIfPresentin classAbstractUrlAccessTokenProvider<HttpURLConnection>
-
supportsHealth
public boolean supportsHealth()
-