Skip to content

Commit

Permalink
Some code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristoffer Skaret committed Jan 30, 2017
1 parent 182b702 commit 82a5616
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@
<scope>provided</scope>
</dependency>
<!--
Jersey benyttes her til all integrasjon
Jersey is used for all integration
-->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.25</version>
</dependency>
<!--
Legger til støtte for å bruke oauth2 som autentiseringsmekanisme (access_token)
Add support for oauth2 as authentication mecanism (access_token)
-->
<dependency>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>oauth2-client</artifactId>
<version>2.25</version>
</dependency>
<!--
Benyttes til parsing av json
Used for parsing of json
-->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
</dependency>
<!--
Støtte for behandling av jwt
Support for jwt
-->
<dependency>
<groupId>com.nimbusds</groupId>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/no/bankid/oidc/BankIdOIDCClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

public class BankIdOIDCClient {

public static final String CONFIG_URL = "https://prototype.bankidnorge.no/bankid-oauth/oauth/.well-known/openid-configuration";
public static final String CALLBACK_URL = "http://localhost:8080/callback";
private static final String CONFIG_URL = "https://prototype.bankidnorge.no/bankid-oauth/oauth/.well-known/openid-configuration";
private static final String CALLBACK_URL = "http://localhost:8080/callback";

private final String authorizationEndpoint;
private final String token_endpoint;
Expand Down Expand Up @@ -68,7 +68,7 @@ public String createAuthenticationUrl() {
authorizationEndpoint, CLIENT_ID, encoded(CALLBACK_URL), encoded(state), "somecorrelationnonce");
}

public static String encoded(String s) {
private static String encoded(String s) {
try {
return encode(s, Charset.forName("UTF-8").name());
} catch (UnsupportedEncodingException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/bankid/oidc/ClientDefinition.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package no.bankid.oidc;

public class ClientDefinition {
class ClientDefinition {

/**
* Client_id and password must be inseted here for the appliction to work.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/bankid/oidc/JWTHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.text.ParseException;
import java.util.List;

public class JWTHandler {
class JWTHandler {

private final JWKSet publicKeys;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/bankid/oidc/web/WelcomeServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class WelcomeServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException {

/**
/*
* Tries to find the user on the session. If no user can be found, a login link is presented.
*
* After login the user will be redirected back to this servlet with the user on the session.
Expand Down

0 comments on commit 82a5616

Please sign in to comment.