-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
149 additions
and
202 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
49 changes: 49 additions & 0 deletions
49
src/examples/java/io/nats/examples/authcallout/AuthCalloutUser.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,49 @@ | ||
package io.nats.examples.authcallout; | ||
|
||
import io.nats.jwt.Permission; | ||
import io.nats.jwt.ResponsePermission; | ||
|
||
public class AuthCalloutUser { | ||
public String user; | ||
public String pass; | ||
public String account; | ||
public Permission pub; | ||
public Permission sub; | ||
public ResponsePermission resp; | ||
|
||
public AuthCalloutUser userPass(String userPass) { | ||
this.user = userPass; | ||
this.pass = userPass; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser user(String user) { | ||
this.user = user; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser pass(String pass) { | ||
this.pass = pass; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser account(String account) { | ||
this.account = account; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser pub(Permission pub) { | ||
this.pub = pub; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser sub(Permission sub) { | ||
this.sub = sub; | ||
return this; | ||
} | ||
|
||
public AuthCalloutUser resp(ResponsePermission resp) { | ||
this.resp = resp; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.