Code Monkey home page Code Monkey logo

Comments (5)

JoAllg avatar JoAllg commented on July 17, 2024 1

Yes just as you thought there is a redirect to the Personal Desktop after the external login.
Requests after puting in the passwort and pressing login:
grafik

Some has implemented a login with python and the selenium driver, maybe this will help:

    from selenium import webdriver
    from selenium.webdriver.firefox.options import Options
    from selenium.webdriver.support import expected_conditions as EC
    from selenium.webdriver.support.ui import WebDriverWait
    ilias_url = "https://ilias.uni-freiburg.de"
    login_url = ilias_url + "/shib_login.php"
    usrname_id = 'LoginForm_username'
    pw_id = 'LoginForm_password'
    submit_name = 'yt0'
    title_substring = 'ILIAS'
    ...
    self.driver = webdriver.Firefox
    self.driver.get(login_url)
    self.driver.find_element_by_id(usrname_id).send_keys(username)
    self.driver.find_element_by_id(pw_id).send_keys(password)
    self.driver.find_element_by_name(submit_name).submit()

    WebDriverWait(self.driver, 30).until(EC.title_contains(title_substring))

from ilias-downloader-cli.

thetric avatar thetric commented on July 17, 2024 1

Hey there! Sorry for the delay :( I tried to automate the detection of external login pages (see #24), please try out this prerelease: https://github.com/thetric/ilias-downloader-cli/releases/tag/v4.1.0-beta.1. In addition this should fix the logging exception above

from ilias-downloader-cli.

thetric avatar thetric commented on July 17, 2024

Hey there! Thanks for using my Ilias downloader! I published v4.0.5 which improves the log output. To enable the debug output use the following snippet:

java -jar -Dlogback.configurationFile=logback-debug.xml ilias-downloader-cli-4.0.5.jar ./ilias

The output console output might be a bit misleading, the login might actually have failed. The CLI currently only supports standard logins directly provided by the Ilias server (like https://www.ilias.fh-dortmund.de/ilias/login.php).

Perhaps I can implement a special login method for the Ilias of Uni Freiburg. I need you to describe the login steps from https://ilias.uni-freiburg.de/login.php to the Ilias "Personal Desktop" (should be https://ilias.uni-freiburg.de//ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems). What happens after the login at https://mylogin.ub.uni-freiburg.de/? Does the server redirect back to the Ilias?

from ilias-downloader-cli.

JoAllg avatar JoAllg commented on July 17, 2024

Thank you for your answer and willingness to implement a solution for my university!
Unfortunately the new version produces an error:

09:51:40,165 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-debug.xml] at [jar:file:/D:/Desktop/ilias-downloader-cli-4.0.5.jar!/logback-debug.xml]
09:51:40,185 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@2a17b7b6 - URL [jar:file:/D:/Desktop/ilias-downloader-cli-4.0.5.jar!/logback-debug.xml] is not of type file
09:51:40,356 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:51:40,361 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:51:40,366 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:51:40,384 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:51:40,484 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI WindowsAnsiOutputStream for the console.
09:51:40,485 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
        at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
        at      at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)
        at      at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:40)
        at      at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:88)
        at      at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:79)
        at      at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
        at      at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
        at      at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at      at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
        at      at mu.KotlinLogging.logger(KotlinLogging.kt:32)
        at      at com.github.thetric.iliasdownloader.cli.CliKt.<clinit>(Cli.kt:10)
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream
        at      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
        at      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at      at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)
        at      ... 22 common frames omitted
09:51:40,486 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
09:51:40,486 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:51:40,487 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:51:40,492 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1f554b06 - Registering current configuration as safe fallback point

Ilias Downloader (CLI): unexpected argument```

from ilias-downloader-cli.

JoAllg avatar JoAllg commented on July 17, 2024

Hey, it's great to hear that you are still working on it!
Now the output is as follows:

D:\Desktop>java -jar -Dlogback.configurationFile=logback-debug.xml ilias-downloader-cli-4.1.0-beta.1.jar -d ./ilias
10:49:24.653 INFO  c.g.t.i.cli.Cli - Settings path: D:\Desktop\.\ilias\.ilias-downloader.json
10:49:24.680 DEBUG c.g.t.i.c.IliasServiceFactory - Trying to load existing config from D:\Desktop\.\ilias\.ilias-downloader.json
10:49:31.760 INFO  c.g.t.i.c.WebParserIliasServiceProvider - External login provider detected, following https://ilias.uni-freiburg.de/shib_login.php
10:49:32.776 INFO  c.g.t.i.c.WebParserIliasServiceProvider - External login provider is located at https://mylogin.ub.uni-freiburg.de/authn/login?context=0_iaa7xswJLdzd6WbASVgqRnfq6%2Ba%2FbF7bfJif4uM2BZeW%2FeC%2BXXbl%2FSfC3ENlFXSCunXkWJip5PpdxF5kXfweQLnMP3tbjR%2FCTDxeBPk%2FxpU9Qz%2BsPe2F%2BxWsCqNc5YqEOWzU0Yuf5DIe0njFaqXYNw%3D%3D
10:49:32.796 DEBUG c.g.t.i.c.WebParserIliasServiceProvider - Found 1 probable login forms:
10:49:32.818 DEBUG c.g.t.i.c.WebParserIliasServiceProvider - Attributes of the login forms:
10:49:32.823 DEBUG c.g.t.i.c.WebParserIliasServiceProvider -  id="login-form" action="/authn/login?context=0_iaa7xswJLdzd6WbASVgqRnfq6%2Ba%2FbF7bfJif4uM2BZeW%2FeC%2BXXbl%2FSfC3ENlFXSCunXkWJip5PpdxF5kXfweQLnMP3tbjR%2FCTDxeBPk%2FxpU9Qz%2BsPe2F%2BxWsCqNc5YqEOWzU0Yuf5DIe0njFaqXYNw%3D%3D" method="post"
Passwort von ja162:
10:50:02.461 INFO  c.g.t.i.c.WebIliasService - Logging in at https://ilias.uni-freiburg.de/ilias.php?lang=en&client_id=unifreiburg&cmd=post&cmdClass=ilstartupgui&cmdNode=yc&baseClass=ilStartUpGUI&rtoken=
10:50:03.655 DEBUG c.g.t.i.c.WebIliasService - Login response location https://ilias.uni-freiburg.de/ilias.php?baseClass=ilrepositorygui&reloadpublic=1&cmd=frameset&ref_id=1
10:50:03.721 INFO  c.g.t.i.c.WebIliasService - Login at https://ilias.uni-freiburg.de/ilias.php?lang=en&client_id=unifreiburg&cmd=post&cmdClass=ilstartupgui&cmdNode=yc&baseClass=ilStartUpGUI&rtoken= succeeded
10:50:04.191 INFO  c.g.t.i.c.WebIliasService - Get all courses and groups from https://ilias.uni-freiburg.de/ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems
10:50:05.645 INFO  c.g.t.i.c.UserPreferencesUpdateService - >>> Gefundene Kurse:
Geben Sie die Nummern der zu synchronisierenden Kurse an (durch ein Leerzeichen getrennt) oder drücken Sie Enter, um direkt alle Kurse auszuwählen:
10:50:56.740 INFO  c.g.t.i.c.SyncController - Syncing 0 courses:
10:50:56.745 INFO  c.g.t.i.c.SyncController - Sync gestartet
10:50:56.749 INFO  c.g.t.i.c.SyncController - Sync beendet

Something does not work yet. Here are the full http-networkrequests.
firefox_77

Please tell me if I can provide more information.

from ilias-downloader-cli.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.