<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Iman</title>
    <description>The latest articles on DEV Community by Iman (@ibhlool7).</description>
    <link>https://dev.to/ibhlool7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F423908%2Febfa05b7-db85-456f-a194-fdae624e6f7d.png</url>
      <title>DEV Community: Iman</title>
      <link>https://dev.to/ibhlool7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ibhlool7"/>
    <language>en</language>
    <item>
      <title>Scratch the edge using Spring WebFlux (Part 2)</title>
      <dc:creator>Iman</dc:creator>
      <pubDate>Fri, 25 Dec 2020 12:04:14 +0000</pubDate>
      <link>https://dev.to/ibhlool7/scratch-the-edge-using-spring-webflux-part-2-1kia</link>
      <guid>https://dev.to/ibhlool7/scratch-the-edge-using-spring-webflux-part-2-1kia</guid>
      <description>&lt;p&gt;Weknow Bob from the previous story and he wants to use his service right now, and he could do it but wait! this is his exclusive service, is he alone right now?&lt;br&gt;
He and the whole world can use this service forever. let’s limit the alien’s access by Spring Security.&lt;br&gt;
First thing first, we need a model for our users (lovely Bob is alone) so let’s create one as the follow in kotlin&amp;gt;com&amp;gt;{something you know}&amp;gt;{project name, that also you know}&amp;gt;model&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Document
data class User(
        @Id
        val id : ObjectId,
        @Indexed(unique = true)
        val name: String,
        val pass: String,
        val role: String
) : UserDetails {

    override fun getAuthorities(): MutableCollection&amp;lt;out GrantedAuthority&amp;gt; {
        return mutableListOf(SimpleGrantedAuthority(role))
    }

    override fun getPassword(): String {
        return pass
    }

    override fun getUsername(): String {
        return name
    }

    override fun isAccountNonExpired() = true

    override fun isAccountNonLocked() = true

    override fun isCredentialsNonExpired() = true

    override fun isEnabled() = true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see two elegant things in one frame, the flexibility of Spring Security and the conciseness of Kotlin (by comparing two different types of method).&lt;/p&gt;

&lt;p&gt;You can find complete story &lt;a href="https://micrommer.medium.com/scratch-the-edge-using-spring-webflux-part-2-9372656adbdf"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>kotlin</category>
      <category>mongodb</category>
      <category>security</category>
    </item>
    <item>
      <title>Scratch the edge using WebFlux (Part 1)</title>
      <dc:creator>Iman</dc:creator>
      <pubDate>Tue, 22 Dec 2020 11:05:48 +0000</pubDate>
      <link>https://dev.to/ibhlool7/scratch-the-edge-using-webflux-part-1-15m7</link>
      <guid>https://dev.to/ibhlool7/scratch-the-edge-using-webflux-part-1-15m7</guid>
      <description>&lt;p&gt;Part 1 (create a simple service using WebFlux)&lt;br&gt;
In this story, we look at the first layer and start it right now. so go to Spring Initializer and create a project with the following config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose Gradle&lt;/li&gt;
&lt;li&gt;Choose lovely Kotlin&lt;/li&gt;
&lt;li&gt;Java 11
You could choose anything you want, these were my favorites and you’ll see the codes base on them.
And the following dependencies:&lt;/li&gt;
&lt;li&gt;Spring Reactive Web (Build reactive web applications with Spring WebFlux and Netty)&lt;/li&gt;
&lt;li&gt;Spring for Apache Kafka (Publish, subscribe, store, and process streams of records)&lt;/li&gt;
&lt;li&gt;Spring Security (Highly customizable authentication)
These are enough so far, generate and extract then open the extracted folder with your favorite IDE (I proudly using Intellij Idea, and it’s my suggestion for you), let it to resolve your dependencies and indexes your project and libraries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are interested, you can find complete story on Medium:&lt;br&gt;
&lt;a href="https://micrommer.medium.com/scratch-the-edge-using-spring-webflux-part-1-8290f9a7cf6b"&gt;https://micrommer.medium.com/scratch-the-edge-using-spring-webflux-part-1-8290f9a7cf6b&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll love your feedback! &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>kotlin</category>
      <category>java</category>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
