Tuesday, February 22, 2022

JBoss EAP7.3 udemy note

 1. The linux command

netstat -an|more: list the active internet connections

nslookup ip/dn: convert ip to dn or dn to ip

2. JBoss server log:





Compile and Run C++ program on mac (m1)

 Compile and Run C++ program on mac (m1):

#include <iostream>

using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}

g++ -o hello hello.cpp

./hello

Thursday, February 17, 2022

algorithms

 1. Find the common number between different int array.

2. Find the same String between different String array. How about if the arrays are super fast, say the duplicate name between US and Canada? two big files

3. Query a LOL player's statistics

4. Display photos

    Display photos with username/password

    Display photos with username/password (no hack/partly)


boolean/int

+-*/ ++ --

== != > < >= <=

&& ||

if/else

swtich(expression){

case c1:

..break;

default:

}

array

For loop

recursion

constructor

static

Math.sqrt(x*x+y*y)

calculate what day after 100 days

read file/write file

Swing


Monday, February 7, 2022

Enterprise OAuth2 and Open ID Connect note (Udemy)

 Enterprise OAuth2 and Open ID Connect

1. Federated user

a single user identity used by all the applications

2. SAML flow


3. What is OAuth2


4. Opaque token
     need verify access token with authorization server every time


5. JWT token
   
   The resource server can verify the signed JWT token by itself, with the public signer



6. Grant type - auth code

Auth code is on the front channal but it expires a few mins, access token is on the back channel

7. Grant type - Implicit

Return the access token from the front channel directly - could be stolen, deprecated

8. Grant type - Client credentials

    Pretty simple, no resource owner/browser agent.

9. Grant Type - ROPC

    Resource Owner Password Credential - deprecated, need the client application and the resource server are the same organization (client application is third party) as the password is exposed to the client application. For example, shutterfly cannot use this grant type.


10. OpenID