Install and test go_oauth2_server

It was design to work with etcd2 which is outdated. So I rewrite it for etcd3.

There is a major trick that did not mentioned at README.md.

You have to load default data make 4 scenarios work.

base data

go-oauth2-server loaddata oauth/fixtures/roles.yml
go-oauth2-server loaddata oauth/fixtures/scopes.yml

test users (default password: test_password)

go-oauth2-server loaddata oauth/fixtures/test_users.yml

test clients

go-oauth2-server loaddata oauth/fixtures/test_clients.yml

test access tokens

go-oauth2-server loaddata oauth/fixtures/test_access_tokens.yml

With these, it works.

If you are not running at source directory, make sure you have copy the web directory to your working directory. (Of course, you don’t need *.go within web directory).

OAuth 2.0 Server

因為RFC只定義了流程,沒定義參數名稱,所以各家的實作,如果沒有講好有跟誰搭配的,都會是個坑,要找套件,就找完整一套的
流程/設備管理類的要找已經與多個Identity Provider有介面的,不然就會像Hydra一樣。
Hydra是一個大坑,跟Identity Provider中間的通訊要自己挖
Identity Provider要找文件清楚的,不然也會像Dex一樣,不知道往哪裡死。
dex也只有咬死的半套,沒有管client那一段。

Install git 2.11 on CentOS 6

There is only git 1.7.x for CentOS 6. I am trying to build something with golang then founds out that “go get” cannot working correctly with older git. But I cannot find git binary new enough. So I build one from source. Why did I take note on this?
There are some missing link.
First get all dependencies

yum install perl cpio curl curl-devel zlib-devel openssl-devel expat-devel gettext-devel gcc perl-ExtUtils-MakeMaker

Generate configure executable

make configure

Config build environment and binary prefix, I have manage to install git to /usr/local/bin

 ./configure --prefix=/usr/local

Now, let’s build it.

make

Install it.

make install

Check if your installed binary have higher priority at PATH. If not, make sure you have put /usr/local/bin in front of /usr/bin(where old git binary located).
Last think to check, check git version.

git --version

If you git the version number you want to see. You made it. I am running on “git 2.11.0 rc2”.