How to propogate deleted user from oauth2 - JHipster, Okta
My JHipster app has some automatic tasks that happen on all users, so I'd like to know if user is deleted from the Identity Provider (in this case Okta):
- Is there any place where this is already implemented?
- If not, I'd welcome suggestions how to implement this?
oauth-2.0 jhipster okta
add a comment |
My JHipster app has some automatic tasks that happen on all users, so I'd like to know if user is deleted from the Identity Provider (in this case Okta):
- Is there any place where this is already implemented?
- If not, I'd welcome suggestions how to implement this?
oauth-2.0 jhipster okta
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45
add a comment |
My JHipster app has some automatic tasks that happen on all users, so I'd like to know if user is deleted from the Identity Provider (in this case Okta):
- Is there any place where this is already implemented?
- If not, I'd welcome suggestions how to implement this?
oauth-2.0 jhipster okta
My JHipster app has some automatic tasks that happen on all users, so I'd like to know if user is deleted from the Identity Provider (in this case Okta):
- Is there any place where this is already implemented?
- If not, I'd welcome suggestions how to implement this?
oauth-2.0 jhipster okta
oauth-2.0 jhipster okta
asked Nov 22 '18 at 8:20
oriraborirab
401513
401513
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45
add a comment |
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45
add a comment |
1 Answer
1
active
oldest
votes
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. https://github.com/okta/okta-sdk-java. For example:
UserList users = client.listUsers();
// stream
client.listUsers().stream().forEach(user -> {
user.deactivate();
user.delete();
});
I implemented usingRestTemplate
directly, the main problem being how to get aClient
object - if you can expand on that I'd be grateful.
– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get aClient
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.
– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
You'll need to add the Okta Java SDK to your build file, its coordinates arecom.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Addokta.client.token=XXX
to your application.yml.
– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426560%2fhow-to-propogate-deleted-user-from-oauth2-jhipster-okta%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. https://github.com/okta/okta-sdk-java. For example:
UserList users = client.listUsers();
// stream
client.listUsers().stream().forEach(user -> {
user.deactivate();
user.delete();
});
I implemented usingRestTemplate
directly, the main problem being how to get aClient
object - if you can expand on that I'd be grateful.
– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get aClient
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.
– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
You'll need to add the Okta Java SDK to your build file, its coordinates arecom.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Addokta.client.token=XXX
to your application.yml.
– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
|
show 2 more comments
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. https://github.com/okta/okta-sdk-java. For example:
UserList users = client.listUsers();
// stream
client.listUsers().stream().forEach(user -> {
user.deactivate();
user.delete();
});
I implemented usingRestTemplate
directly, the main problem being how to get aClient
object - if you can expand on that I'd be grateful.
– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get aClient
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.
– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
You'll need to add the Okta Java SDK to your build file, its coordinates arecom.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Addokta.client.token=XXX
to your application.yml.
– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
|
show 2 more comments
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. https://github.com/okta/okta-sdk-java. For example:
UserList users = client.listUsers();
// stream
client.listUsers().stream().forEach(user -> {
user.deactivate();
user.delete();
});
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. https://github.com/okta/okta-sdk-java. For example:
UserList users = client.listUsers();
// stream
client.listUsers().stream().forEach(user -> {
user.deactivate();
user.delete();
});
answered Nov 28 '18 at 15:19
Matt RaibleMatt Raible
3,00963075
3,00963075
I implemented usingRestTemplate
directly, the main problem being how to get aClient
object - if you can expand on that I'd be grateful.
– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get aClient
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.
– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
You'll need to add the Okta Java SDK to your build file, its coordinates arecom.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Addokta.client.token=XXX
to your application.yml.
– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
|
show 2 more comments
I implemented usingRestTemplate
directly, the main problem being how to get aClient
object - if you can expand on that I'd be grateful.
– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get aClient
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.
– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
You'll need to add the Okta Java SDK to your build file, its coordinates arecom.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Addokta.client.token=XXX
to your application.yml.
– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
I implemented using
RestTemplate
directly, the main problem being how to get a Client
object - if you can expand on that I'd be grateful.– orirab
Nov 29 '18 at 13:02
I implemented using
RestTemplate
directly, the main problem being how to get a Client
object - if you can expand on that I'd be grateful.– orirab
Nov 29 '18 at 13:02
If you have the correct dependencies in your classpath, you can use dependency injection to get a
Client
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.– Matt Raible
Nov 29 '18 at 18:27
If you have the correct dependencies in your classpath, you can use dependency injection to get a
Client
instance. See github.com/oktadeveloper/okta-ionic-crypto-java-sdk-example/… for an example.– Matt Raible
Nov 29 '18 at 18:27
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
II tried using DI, it wasn't trivial and the REST API is simple enough... an example of DI on top of Jhipster would probably help some people avoid this. Thanks for all the help!
– orirab
Dec 2 '18 at 12:00
1
1
You'll need to add the Okta Java SDK to your build file, its coordinates are
com.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Add okta.client.token=XXX
to your application.yml.– Matt Raible
Dec 3 '18 at 14:19
You'll need to add the Okta Java SDK to your build file, its coordinates are
com.okta.spring:okta-spring-sdk
. Then, you’ll need to create an API token. The abbreviated steps are as follows: 1. Log in to your Developer Console 2. Navigate to API > Tokens and click Create Token 3. Give your token a name, then copy its value Add okta.client.token=XXX
to your application.yml.– Matt Raible
Dec 3 '18 at 14:19
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
Is there a way to limit the authority of a token? to only access one app, or perform only certain actions?
– orirab
Dec 5 '18 at 18:28
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426560%2fhow-to-propogate-deleted-user-from-oauth2-jhipster-okta%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This is not implemented in the current version of JHipster. You could use the Okta Java SDK to delete users. github.com/okta/okta-sdk-java
– Matt Raible
Nov 22 '18 at 16:15
thank you, if you'll just submit this as an answer I'll accept it :) If possible, a small sample code will be very appreciated as well!
– orirab
Nov 23 '18 at 9:45