com.auth0.AuthenticationController Java Examples
The following examples show how to use
com.auth0.AuthenticationController.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AuthenticationControllerProvider.java From auth0-servlet-sample with MIT License | 5 votes |
public static AuthenticationController getInstance(ServletConfig config) throws UnsupportedEncodingException { String domain = config.getServletContext().getInitParameter("com.auth0.domain"); String clientId = config.getServletContext().getInitParameter("com.auth0.clientId"); String clientSecret = config.getServletContext().getInitParameter("com.auth0.clientSecret"); if (domain == null || clientId == null || clientSecret == null) { throw new IllegalArgumentException("Missing domain, clientId, or clientSecret. Did you update src/main/webapp/WEB-INF/web.xml?"); } // JwkProvider required for RS256 tokens. If using HS256, do not use. JwkProvider jwkProvider = new JwkProviderBuilder(domain).build(); return AuthenticationController.newBuilder(domain, clientId, clientSecret) .withJwkProvider(jwkProvider) .build(); }
Example #2
Source File: AppConfig.java From auth0-spring-security-mvc-sample with MIT License | 5 votes |
@Bean public AuthenticationController authenticationController() throws UnsupportedEncodingException { JwkProvider jwkProvider = new JwkProviderBuilder(domain).build(); return AuthenticationController.newBuilder(domain, clientId, clientSecret) .withJwkProvider(jwkProvider) .build(); }
Example #3
Source File: AuthConfig.java From tutorials with MIT License | 5 votes |
@Bean public AuthenticationController authenticationController() throws UnsupportedEncodingException { JwkProvider jwkProvider = new JwkProviderBuilder(domain).build(); return AuthenticationController.newBuilder(domain, clientId, clientSecret) .withJwkProvider(jwkProvider) .build(); }