Skip to content

Commit

Permalink
Add comments for the key regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
judy2k committed Feb 20, 2017
1 parent ee926c3 commit cc68de7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/com/nexmo/client/auth/JWTAuthMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@
import java.util.regex.Pattern;

public class JWTAuthMethod extends AbstractAuthMethod {
private static final Pattern pemPattern = Pattern.compile("-----BEGIN PRIVATE KEY-----" +
"(.*\\n)" +
"-----END PRIVATE KEY-----\\n?", Pattern.MULTILINE | Pattern.DOTALL);
private static final Pattern pemPattern = Pattern.compile(
"-----BEGIN PRIVATE KEY-----" + // File header
"(.*\\n)" + // Key data
"-----END PRIVATE KEY-----" + // File footer
"\\n?", // Optional trailing line break
Pattern.MULTILINE | Pattern.DOTALL);
public final int SORT_KEY = 10;
private String applicationId;
private JWTSigner signer;
Expand Down

0 comments on commit cc68de7

Please sign in to comment.