Skip to content

Conversation

@fzhulitov
Copy link
Contributor

No description provided.

fzhulitov and others added 21 commits June 9, 2021 20:02
…ssword = 12345

Registration work, write to base (login, pass) if not already registred

Now Login via autogenerated passwd via /login
With base auth work register via Postman post
If you login in browser and go to /username -  it print username from Priincipal, but it don't work from postman with base auth

I think   properties.setProperty("hibernate.hbm2ddl.auto", "update"); didn't work, can't add colum, if you change to "create", it make new table easy

Some debug option added/
TAking new version from hedin
# Conflicts:
#	src/main/java/ru/hedin/modelka/config/WebSecurityConfig.java
…ssword = 12345

Registration work, write to base (login, pass) if not already registred
md5 work on registration and login
Base Hold md5 password

Troubles -  see no reaction on roles
…ssword = 12345

Registration work, write to base (login, pass) if not already registred
md5 work on registration and login
Base Hold md5 password

settings from security.xml work, not all can't make sucseclogin redirect///
All over work
One strange think - registration can make only not logged Principal (Anonimous)- it is ok, by logic, but may be need to all ???
Need something about cross site
…ht cant get data. Headers is ok.

Strange things -  in headers only allowed GET -  ignoring settings.
get auth - go java, but return 405
get auth - go java, but return 405
get auth - go java, but cors
get auth - go java, but cors
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем нам httpclient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтоб добавить хедер с количеством записей в json

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Клиент это зверь который вызывает по хттн другие хосты. Он не должен быть для этого нужен.

}
}

/*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

стоит убрать если это не нужно.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не помню чтоб ставил, что ты хочешь убрать коменты или скобки ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

коменты

// @Override
// @Bean

public void addCorsMappings(CorsRegistry registry) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А это нам сейчас нужно?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет наверное, если мы не вернемся к необходимости корс

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не нужное давай убирать, если очень нонадобится поднимем в истории.

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше убрать закоментированное.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну если убирать корс фильтр, то и все что в нем

@EnableWebSecurity
@EnableGlobalAuthentication
@ComponentScan
@ImportResource("classpath:security.xml")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо бы проверить будет ли все работать если @ImportResource("classpath:security.xml") утащить на основной конфиг а этот совсем убрать.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это вобще другое, но надо проверю..




/*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дальше кажется все мусор.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Моджет быть, я в еррор не лазил, это ты делал

// private BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(12);
public boolean creteUser (ModUser modUser){

// User to save to database via repository @link
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Старые варианты лучше убирать.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошо почищу

// if (null == user) {
ModUser user = userRepository.getUserByLogin(username);
if (null == user) {
// throw new BadCredentialsException("");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это было мое изменение чтобы поиграться во временной ветке.
Кажется оно не нужно в мастере.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ок, я не трогаю твой код

@fzhulitov
Copy link
Contributor Author

Ставь свои версии js, в моих состояние странное, и по скольку я так и не понял, что там с логином, и вид плохой

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

Successfully merging this pull request may close these issues.

2 participants