Skip to content

Commit

Permalink
support cas authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda committed Jun 2, 2023
1 parent 77914c1 commit b6f1e00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ use crate::{config::Config, state::State, Props, PropsExt};

impl<W: Write> State<W> {
pub(crate) fn negotiate_otp(&mut self, props: &Props, cfg: &Config) -> Result<Props> {
match props.get_prop("authentication.type")?.as_str() {
"ldap" => {
writeln!(self.out, "Authenticating with ldap")?;
let ty = props.get_prop("authentication.type")?.as_str();
match ty {
"cas" | "ldap" => {
writeln!(self.out, "Authenticating with {ty}")?;
let user = self.resolve_username(&cfg.username)?;
let pass = self.resolve_password(&cfg.password)?;

Expand Down

0 comments on commit b6f1e00

Please sign in to comment.