Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to get required help to accomplish SLO with okta #127

Open
gtiwari2015 opened this issue Nov 16, 2022 · 0 comments
Open

unable to get required help to accomplish SLO with okta #127

gtiwari2015 opened this issue Nov 16, 2022 · 0 comments

Comments

@gtiwari2015
Copy link

unable to use SLO, how to direct request to SLO url

i am trying to saml-client to SP initiated logout with okta , i am able to use SSO login with okta. but i need guidance on how to proceed

public String sendSAMLRequest(String loggedinUser) throws SamlException, FileNotFoundException {
String publicKeyPath = "cert.x509.pem";
String privateKeyPath = "private.pk8";
final String fileSeparator = System.getProperty("file.separator");
final File file = PathUtils.getTempFile(getServerPath(), "metadata", ".xml");
final File directory = FileUtils.getFile(getServerPath(), "WEB-INF" + fileSeparator + "classes");
final File metadatafile = new File(directory + fileSeparator + SamlReportAuditFactory.FILE_NAME);
FileReader fileReader = new FileReader(metadatafile);
SamlClient client = SamlClient.fromMetadata("http://www.okta.com/jlsdjflsjdflsjjlfjlsj", "https://localhost:8443/myapp/rest/sp/consumer", fileReader);

    final File privateKeyFile = new File(directory + fileSeparator + privateKeyPath);

    final File publicKeyFile  = new File(directory + fileSeparator + publicKeyPath);
    client.setSPKeys(publicKeyFile.getAbsolutePath(),privateKeyFile.getAbsolutePath());
    String encodedRequest = client.getLogoutRequest(loggedinUser);
 
    return encodedRequest;
 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant