Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
CTF
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grzegorz
CTF
Commits
f6d8e4c6
Commit
f6d8e4c6
authored
Feb 21, 2016
by
Grzegorz Pietrusza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dropwizard auth
parent
cd6fb4c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
dropwizard-auth-0.9.2.jar
dropwizard-auth-0.9.2.jar
+0
-0
pom.xml
service/pom.xml
+5
-0
CTFApplication.java
service/src/main/java/CTFApplication.java
+5
-0
No files found.
dropwizard-auth-0.9.2.jar
0 → 100644
View file @
f6d8e4c6
File added
service/pom.xml
View file @
f6d8e4c6
...
...
@@ -26,6 +26,11 @@
<artifactId>
dropwizard-core
</artifactId>
<version>
0.9.0
</version>
</dependency>
<!--<dependency>-->
<!--<groupId>io.dropwizard</groupId>-->
<!--<artifactId>dropwizard-auth</artifactId>-->
<!--<version>0.9.2</version>-->
<!--</dependency>-->
<dependency>
<groupId>
com.google.inject
</groupId>
<artifactId>
guice
</artifactId>
...
...
service/src/main/java/CTFApplication.java
View file @
f6d8e4c6
...
...
@@ -75,6 +75,10 @@ public class CTFApplication extends Application<ApplicationConfiguration> {
environment
.
jersey
().
register
(
injector
.
getInstance
(
TeamsResource
.
class
));
environment
.
jersey
().
register
(
injector
.
getInstance
(
TasksResource
.
class
));
environment
.
jersey
().
register
(
injector
.
getInstance
(
ProxyResource
.
class
));
//REGISTER AUTH
environment
.
jersey
().
register
(
new
BasicAuthProvider
<
User
>(
new
ExampleAuthenticator
(),
"SUPER SECRET STUFF"
));
}
//todo: inject dbonnector
...
...
@@ -104,6 +108,7 @@ public class CTFApplication extends Application<ApplicationConfiguration> {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
//todo: add mongo-java-driver as maven dep
//todo: add dropwizard-auth as maven dep
new
CTFApplication
().
run
(
args
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment