-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add api key auth and implement for nabu plugin
- Loading branch information
Showing
6 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
plugin-nabu/src/main/java/ca/on/oicr/gsi/shesmu/nabu/NabuConfiguration.java
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
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
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
20 changes: 20 additions & 0 deletions
20
...n/java/ca/on/oicr/gsi/shesmu/plugin/authentication/AuthenticationConfigurationAPIkey.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ca.on.oicr.gsi.shesmu.plugin.authentication; | ||
|
||
import java.io.IOException; | ||
|
||
public final class AuthenticationConfigurationAPIkey extends AuthenticationConfiguration { | ||
private String apikey; | ||
|
||
public String getAPIkey() { | ||
return apikey; | ||
} | ||
|
||
@Override | ||
public String prepareAuthentication() throws IOException { | ||
return apikey; | ||
} | ||
|
||
public void setAPIkey(String apikey) { | ||
this.apikey = apikey; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...va/ca/on/oicr/gsi/shesmu/plugin/authentication/AuthenticationConfigurationFileAPIkey.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ca.on.oicr.gsi.shesmu.plugin.authentication; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
|
||
public final class AuthenticationConfigurationFileAPIkey extends AuthenticationConfiguration { | ||
private String apikeyFile; | ||
|
||
public String getAPIkeyFile() { | ||
return apikeyFile; | ||
} | ||
|
||
@Override | ||
public String prepareAuthentication() throws IOException { | ||
return Files.readString(Paths.get(apikeyFile)).trim(); | ||
} | ||
|
||
public void setAPIkeyFile(String apikeyFile) { | ||
this.apikeyFile = apikeyFile; | ||
} | ||
} |