| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. | 1 // Copyright 2016 The LUCI Authors. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken" | 26 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken" |
| 27 "github.com/luci/luci-go/tokenserver/appengine/impl/serviceaccounts" | 27 "github.com/luci/luci-go/tokenserver/appengine/impl/serviceaccounts" |
| 28 | 28 |
| 29 "github.com/luci/luci-go/tokenserver/api/admin/v1" | 29 "github.com/luci/luci-go/tokenserver/api/admin/v1" |
| 30 ) | 30 ) |
| 31 | 31 |
| 32 // serverImpl implements admin.AdminServer RPC interface. | 32 // serverImpl implements admin.AdminServer RPC interface. |
| 33 type serverImpl struct { | 33 type serverImpl struct { |
| 34 certconfig.ImportCAConfigsRPC | 34 certconfig.ImportCAConfigsRPC |
| 35 delegation.ImportDelegationConfigsRPC | 35 delegation.ImportDelegationConfigsRPC |
| 36 delegation.InspectDelegationTokenRPC |
| 37 machinetoken.InspectMachineTokenRPC |
| 36 serviceaccounts.ImportServiceAccountsConfigsRPC | 38 serviceaccounts.ImportServiceAccountsConfigsRPC |
| 37 machinetoken.InspectMachineTokenRPC | |
| 38 delegation.InspectDelegationTokenRPC | |
| 39 serviceaccounts.InspectOAuthTokenGrantRPC | 39 serviceaccounts.InspectOAuthTokenGrantRPC |
| 40 } | 40 } |
| 41 | 41 |
| 42 // NewServer returns prod AdminServer implementation. | 42 // NewServer returns prod AdminServer implementation. |
| 43 // | 43 // |
| 44 // It assumes authorization has happened already. | 44 // It assumes authorization has happened already. |
| 45 func NewServer() admin.AdminServer { | 45 func NewServer() admin.AdminServer { |
| 46 signer := gaesigner.Signer{} | 46 signer := gaesigner.Signer{} |
| 47 return &serverImpl{ | 47 return &serverImpl{ |
| 48 ImportDelegationConfigsRPC: delegation.ImportDelegationConfigsRP
C{ | 48 ImportDelegationConfigsRPC: delegation.ImportDelegationConfigsRP
C{ |
| 49 RulesCache: delegation.GlobalRulesCache, | 49 RulesCache: delegation.GlobalRulesCache, |
| 50 }, | 50 }, |
| 51 InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{ |
| 52 Signer: signer, |
| 53 }, |
| 51 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ | 54 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ |
| 52 Signer: signer, | 55 Signer: signer, |
| 53 }, | 56 }, |
| 54 » » InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{ | 57 » » ImportServiceAccountsConfigsRPC: serviceaccounts.ImportServiceAc
countsConfigsRPC{ |
| 55 » » » Signer: signer, | 58 » » » RulesCache: serviceaccounts.GlobalRulesCache, |
| 56 }, | 59 }, |
| 57 } | 60 } |
| 58 } | 61 } |
| OLD | NEW |