8
8
getOpenidClientsResponse ,
9
9
addClientResponse ,
10
10
editClientResponse ,
11
- deleteClientResponse ,
12
- getUMAResourcesByClientResponse ,
11
+ deleteClientResponse
13
12
} from '../actions/OIDCActions'
14
13
import { getAPIAccessToken } from '../actions/AuthActions'
15
14
import { OIDC } from '../audit/Resources'
@@ -24,8 +23,7 @@ import {
24
23
ADD_NEW_CLIENT ,
25
24
EDIT_CLIENT ,
26
25
DELETE_CLIENT ,
27
- SEARCH_CLIENTS ,
28
- GET_UMA_RESOURCES
26
+ SEARCH_CLIENTS
29
27
} from '../actions/types'
30
28
import OIDCApi from '../api/OIDCApi'
31
29
import { getClient } from 'Redux/api/base'
@@ -47,21 +45,6 @@ function* newFunction() {
47
45
return new OIDCApi ( api )
48
46
}
49
47
50
- function * newUMAFunction ( ) {
51
- const wholeToken = yield select ( ( state ) => state . authReducer . token )
52
- let token = null
53
- if ( wholeToken ) {
54
- token = yield select ( ( state ) => state . authReducer . token . access_token )
55
- } else {
56
- token = null
57
- }
58
- const issuer = yield select ( ( state ) => state . authReducer . issuer )
59
- const api = new JansConfigApi . OAuthUMAResourcesApi (
60
- getClient ( JansConfigApi , token , issuer ) ,
61
- )
62
- return new OIDCApi ( api )
63
- }
64
-
65
48
export function * getOauthOpenidClients ( { payload } ) {
66
49
const audit = yield * initAudit ( )
67
50
try {
@@ -139,28 +122,6 @@ export function* deleteAClient({ payload }) {
139
122
}
140
123
}
141
124
142
- export function * getUMAResourcesByClient ( { payload } ) {
143
- const audit = yield * initAudit ( )
144
- try {
145
- payload = payload ? payload : { }
146
- addAdditionalData ( audit , FETCH , GET_UMA_RESOURCES , payload )
147
- const openIdApi = yield * newUMAFunction ( )
148
- const data = yield call (
149
- openIdApi . getUMAResources ,
150
- payload . inum ,
151
- )
152
- yield put ( getUMAResourcesByClientResponse ( data ) )
153
- yield call ( postUserAction , audit )
154
- } catch ( e ) {
155
- console . log ( e )
156
- yield put ( getUMAResourcesByClientResponse ( null ) )
157
- if ( isFourZeroOneError ( e ) ) {
158
- const jwt = yield select ( ( state ) => state . authReducer . userinfo_jwt )
159
- yield put ( getAPIAccessToken ( jwt ) )
160
- }
161
- }
162
- }
163
-
164
125
export function * getOpenidClientsWatcher ( ) {
165
126
yield takeLatest ( GET_OPENID_CLIENTS , getOauthOpenidClients )
166
127
}
@@ -179,9 +140,6 @@ export function* editClientWatcher() {
179
140
export function * deleteClientWatcher ( ) {
180
141
yield takeLatest ( DELETE_CLIENT , deleteAClient )
181
142
}
182
- export function * getUMAResourcesByClientWatcher ( ) {
183
- yield takeLatest ( GET_UMA_RESOURCES , getUMAResourcesByClient )
184
- }
185
143
186
144
export default function * rootSaga ( ) {
187
145
yield all ( [
@@ -190,6 +148,5 @@ export default function* rootSaga() {
190
148
fork ( addClientWatcher ) ,
191
149
fork ( editClientWatcher ) ,
192
150
fork ( deleteClientWatcher ) ,
193
- fork ( getUMAResourcesByClientWatcher ) ,
194
151
] )
195
152
}
0 commit comments