Created
September 14, 2016 17:41
-
-
Save wendelicious/ca8ac2fc28edd65b8f1f954f462414b5 to your computer and use it in GitHub Desktop.
Auth token fluent configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ServletModule infusionsoftIdApplication(String... anonymousPaths) { | |
final String[] antPaths; | |
if (null == anonymousPaths) { | |
antPaths = new String[0]; | |
} else { | |
antPaths = anonymousPaths; | |
} | |
final InfusionsoftIdCasAuthenticator casAuthenticator = new InfusionsoftIdCasAuthenticator(); | |
return module() | |
.authenticatedByDefault() | |
.anonymous(antPaths) | |
.allowSwaggerSpec() | |
.and() | |
.authToken(casAuthenticator).asAuthorizationBearerTokenHeader() | |
.authToken(casAuthenticator).asParameter("_authToken") | |
.build(); | |
} |
what about:
.authToken(casAuthenticator)
.asAuthorizationBearerTokenHeader()
.asParameter("_authToken")
??
<mumble>
... This is where I started ... reasons ... </mumble>
I'll look into it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This makes me think I want to change how I build the JWT garbage to follow
authToken(jwtAuthenticator).asJwt()
or something.